%% PVS Version 3.1 %% 6.2 [Linux (x86)] (Feb 13, 2003 4:25) \$\$\$everything.pvs everything : THEORY BEGIN IMPORTING top_derivative, top_sequences, top_limits, top_continuity END everything \$\$\$inverse_continuous_functions.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % More properties of continuous functions [T1 -> T2] % % Applications of continuity_interval % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% inverse_continuous_functions [ T1, T2 : NONEMPTY_TYPE FROM real ] : THEORY BEGIN ASSUMING % BUG: T1_pred is not correctly expanded % connected_domain : ASSUMPTION % FORALL (x, y : T1), (z : real) : % x <= z AND z <= y IMPLIES T1_pred(z) connected_domain : ASSUMPTION FORALL (x, y : T1), (z : real) : x <= z AND z <= y IMPLIES (EXISTS (u : T1) : z = u) ENDASSUMING IMPORTING continuous_functions_props g : VAR { f : [T1 -> T2] | continuous(f) } %------------------------------------------------------------- % inverse of a continuous, bijective function is continuous %------------------------------------------------------------- inverse_incr : LEMMA bijective?[T1, T2](g) AND strict_increasing(g) IMPLIES continuous(inverse(g)) inverse_decr : LEMMA bijective?[T1, T2](g) AND strict_decreasing(g) IMPLIES continuous(inverse(g)) inverse_continuous : PROPOSITION bijective?[T1, T2](g) IMPLIES continuous(inverse(g)) END inverse_continuous_functions \$\$\$inverse_continuous_functions.prf (|inverse_continuous_functions| (|inverse_incr| "" (SKOSIMP) (("" (ASSERT) (("" (EXPAND "bijective?") (("" (EXPAND "continuous") (("" (SKOSIMP) (("" (DELETE -1) (("" (REWRITE "continuity_def[T2]") (("" (EXPAND "surjective?") (("" (INST-CP -1 "x0!1") (("" (SKOLEM!) (("" (CASE-REPLACE "inverse(g!1)(x0!1) = x!1") (("1" (DELETE -1) (("1" (SKOLEM!) (("1" (CASE "EXISTS (d : posreal) : FORALL (u : T1) : x0!1 - g!1(u) < d IMPLIES x!1 - u < epsilon!1") (("1" (CASE "EXISTS (d : posreal) : FORALL (u : T1) : g!1(u) - x0!1 < d IMPLIES u - x!1 < epsilon!1") (("1" (SKOSIMP*) (("1" (INST 1 "min(d!1, d!2)") (("1" (SKOSIMP) (("1" (INST -3 "x!2") (("1" (SKOLEM!) (("1" (CASE-REPLACE "inverse(g!1)(x!2) = x!3") (("1" (DELETE -1) (("1" (INST -1 "x!3") (("1" (INST -2 "x!3") (("1" (DELETE -5) (("1" (GRIND :EXCLUDE "min") NIL))))))))) ("2" (REWRITE "bijective_inverse") (("2" (ASSERT) NIL))))))))))))))) ("2" (DELETE -1 -2 2) (("2" (CASE "EXISTS (v : T1) : x!1 + epsilon!1 = v") (("1" (SKOLEM!) (("1" (EXPAND "strict_increasing") (("1" (INST-CP -3 "x!1" "v!1") (("1" (ASSERT) (("1" (ASSERT) (("1" (INST 1 "g!1(v!1) - x0!1") (("1" (SKOSIMP) (("1" (INST -4 "v!1" "u!1") (("1" (ASSERT) NIL))))))))))))))))) ("2" (INST 2 "1") (("2" (SKOSIMP) (("2" (LEMMA "connected_domain") (("2" (INST -1 "x!1" "u!1" "x!1 + epsilon!1") (("2" (ASSERT) NIL))))))))))))))) ("2" (DELETE -1 2) (("2" (CASE "EXISTS (v : T1) : x!1 - epsilon!1 = v") (("1" (SKOLEM!) (("1" (EXPAND "strict_increasing") (("1" (INST-CP -3 "v!1" "x!1") (("1" (ASSERT) (("1" (ASSERT) (("1" (INST 1 "x0!1 - g!1(v!1)") (("1" (SKOSIMP) (("1" (INST -4 "u!1" "v!1") (("1" (ASSERT) NIL))))))))))))))))) ("2" (INST 2 "1") (("2" (SKOSIMP) (("2" (LEMMA "connected_domain") (("2" (INST -1 "u!1" "x!1" "x!1 - epsilon!1") (("2" (ASSERT) NIL))))))))))))))))))) ("2" (REWRITE "bijective_inverse") (("2" (ASSERT) NIL))))))))))))))))))))))))) (|inverse_decr| "" (SKOSIMP) (("" (ASSERT) (("" (EXPAND "bijective?") (("" (EXPAND "continuous") (("" (SKOSIMP) (("" (DELETE -1) (("" (REWRITE "continuity_def[T2]") (("" (EXPAND "surjective?") (("" (INST-CP -1 "x0!1") (("" (SKOLEM!) (("" (CASE-REPLACE "inverse(g!1)(x0!1) = x!1") (("1" (DELETE -1) (("1" (SKOLEM!) (("1" (CASE "EXISTS (d : posreal) : FORALL (u : T1) : x0!1 - g!1(u) < d IMPLIES u - x!1 < epsilon!1") (("1" (CASE "EXISTS (d : posreal) : FORALL (u : T1) : g!1(u) - x0!1 < d IMPLIES x!1 - u < epsilon!1") (("1" (SKOSIMP*) (("1" (INST 1 "min(d!1, d!2)") (("1" (SKOSIMP) (("1" (INST -3 "x!2") (("1" (SKOLEM!) (("1" (CASE-REPLACE "inverse(g!1)(x!2) = x!3") (("1" (DELETE -1) (("1" (INST -1 "x!3") (("1" (INST -2 "x!3") (("1" (GRIND :EXCLUDE ("min" "strict_decreasing")) NIL))))))) ("2" (REWRITE "bijective_inverse") (("2" (ASSERT) NIL))))))))))))))) ("2" (DELETE -1 -2 2) (("2" (CASE "EXISTS (v : T1) : x!1 - epsilon!1 = v") (("1" (SKOLEM!) (("1" (EXPAND "strict_decreasing") (("1" (INST-CP -3 "v!1" "x!1") (("1" (ASSERT) (("1" (ASSERT) (("1" (INST 1 "g!1(v!1) - x0!1") (("1" (SKOSIMP) (("1" (INST -4 "u!1" "v!1") (("1" (ASSERT) NIL))))))))))))))))) ("2" (INST 2 "1") (("2" (SKOSIMP) (("2" (LEMMA "connected_domain") (("2" (INST -1 "u!1" "x!1" "x!1 - epsilon!1") (("2" (ASSERT) NIL))))))))))))))) ("2" (DELETE -1 2) (("2" (CASE "EXISTS (v : T1) : x!1 + epsilon!1 = v") (("1" (SKOLEM!) (("1" (EXPAND "strict_decreasing") (("1" (INST-CP -3 "x!1" "v!1") (("1" (ASSERT) (("1" (ASSERT) (("1" (INST 1 "x0!1 - g!1(v!1)") (("1" (SKOSIMP) (("1" (INST -4 "v!1" "u!1") (("1" (ASSERT) NIL))))))))))))))))) ("2" (INST 2 "1") (("2" (SKOSIMP) (("2" (LEMMA "connected_domain") (("2" (INST -1 "x!1" "u!1" "x!1 + epsilon!1") (("2" (ASSERT) NIL))))))))))))))))))) ("2" (REWRITE "bijective_inverse") (("2" (ASSERT) NIL))))))))))))))))))))))))) (|inverse_continuous| "" (SKOSIMP) (("" (ASSERT) (("" (EXPAND "bijective?") (("" (FLATTEN) (("" (USE "inj_monotone[T1]") (("1" (GROUND) (("1" (REWRITE "inverse_incr") NIL) ("2" (REWRITE "inverse_decr") NIL) ("3" (EXPAND "injective?") (("3" (PROPAX) NIL))))) ("2" (LEMMA "connected_domain") (("2" (SKOSIMP) (("2" (INST -1 "x!1" "y!1" "z!1") (("2" (ASSERT) NIL)))))))))))))))))) \$\$\$restriction_continuous.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Restriction of continuous functions % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% restriction_continuous[T1 : TYPE FROM real ] : THEORY BEGIN IMPORTING continuous_functions f : VAR [real -> real] restrict_continuous : PROPOSITION continuous(f) IMPLIES continuous[T1](f) END restriction_continuous restriction_continuous2[T1, T2 : TYPE FROM real] : theory BEGIN ASSUMING sub_domain : ASSUMPTION FORALL (x : T1) : EXISTS (y : T2) : x = y ENDASSUMING IMPORTING continuous_functions f : VAR [T2 -> real] sub_dom : LEMMA FORALL (u : T1) : T2_pred(u) restrict2(f) : [T1 -> real] = LAMBDA (u : T1) : f(u) CONVERSION restrict2 restrict_continuous2 : PROPOSITION continuous(f) IMPLIES continuous[T1](f) END restriction_continuous2 \$\$\$restriction_continuous.prf (|restriction_continuous| (|restrict_continuous| "" (SKOSIMP) (("" (EXPAND "continuous") (("" (SKOLEM!) (("" (INST?) (("" (REWRITE "continuity_def[real]") (("" (REWRITE "continuity_def[T1]") (("" (EXPAND "restrict") (("" (SKOLEM!) (("" (INST -1 "epsilon!1") (("" (SKOLEM!) (("" (INST 1 "delta!1") (("" (SKOSIMP) (("" (INST?) (("" (ASSERT) NIL))))))))))))))))))))))))))))(|restriction_continuous2| (|sub_dom| "" (LEMMA "sub_domain") (("" (GRIND) NIL))) (|restrict2_TCC1| "" (LEMMA "sub_dom") (("" (PROPAX) NIL))) (|restrict_continuous2| "" (SKOSIMP) (("" (AUTO-REWRITE "sub_dom") (("" (EXPAND "continuous") (("" (SKOLEM!) (("" (INST?) (("" (REWRITE "continuity_def[T2]") (("" (REWRITE "continuity_def[T1]") (("" (EXPAND "restrict2") (("" (SKOLEM!) (("" (INST -1 "epsilon!1") (("" (SKOLEM!) (("" (INST 1 "delta!1") (("" (SKOSIMP) (("" (INST?) (("" (ASSERT) NIL)))))))))))))))))))))))))))))) \$\$\$composition_continuous.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Composition of continuous functions % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% composition_continuous [ T1, T2 : TYPE FROM real ] : THEORY BEGIN IMPORTING continuous_functions, real_fun_props f : VAR [T1 -> T2] g : VAR [T2 -> real] x0 : VAR T1 F : VAR { E : setof[real] | subset?(E, T1_pred) } composition_continuous1 : PROPOSITION continuous(f, x0) AND continuous(g, f(x0)) IMPLIES continuous(g o f, x0) composition_continuous2 : PROPOSITION continuous(f, F) AND continuous(g, Im(f, F)) IMPLIES continuous(g o f, F) composition_continuous3 : PROPOSITION continuous(f) AND continuous(g) IMPLIES continuous(g o f) END composition_continuous \$\$\$composition_continuous.prf (|composition_continuous| (|composition_continuous1| "" (GRIND :DEFS NIL :REWRITES ("continuity_def[T1]" "continuity_def[T2]" "o") :IF-MATCH NIL) (("" (INST? -5) (("" (SKOLEM!) (("" (INST -4 "delta!1") (("" (SKOLEM!) (("" (INST 1 "delta!2") (("" (SKOSIMP) (("" (INST -4 "x!1") (("" (INST -5 "f!1(x!1)") (("" (ASSERT) NIL))))))))))))))))))) (|composition_continuous2_TCC1| "" (SKOLEM-TYPEPRED) (("" (FLATTEN) (("" (DELETE -2) (("" (GRIND) NIL))))))) (|composition_continuous2| "" (GRIND :EXCLUDE ("convergence") :IF-MATCH NIL) (("" (INST?) (("" (ASSERT) (("" (DELETE -1 -2) (("" (INST?) (("" (INST?) (("1" (GRIND :EXCLUDE ("abs" "adh") :IF-MATCH NIL) (("1" (INST? -6) (("1" (SKOLEM!) (("1" (INST -4 "delta!1") (("1" (SKOLEM!) (("1" (INST 1 "delta!2") (("1" (SKOSIMP) (("1" (INST -4 "x!1") (("1" (INST -6 "f!1(x!1)") (("1" (ASSERT) (("1" (INST?) (("1" (ASSERT) NIL))))))))))))))))))))))) ("2" (INST?) (("2" (ASSERT) NIL))))))))))))))) (|composition_continuous3| "" (GRIND :DEFS NIL :REWRITES ("continuous_def2[T1]")) (("" (REWRITE "composition_continuous2") (("1" (REWRITE "continuity_subset2[T2]") (("1" (DELETE -1 -2 2 3) (("1" (GRIND) NIL))))) ("2" (REWRITE "subset_reflexive") NIL)))))) \$\$\$top_continuity.pvs top_continuity : THEORY BEGIN IMPORTING continuous_functions, composition_continuous, restriction_continuous, restriction_continuous2, continuous_functions_props, inverse_continuous_functions END top_continuity \$\$\$top_limits.pvs top_limits : THEORY BEGIN IMPORTING limit_of_functions, limit_of_composition END top_limits \$\$\$limit_of_composition.pvs limit_of_composition [ T1, T2 : TYPE FROM real ] : THEORY BEGIN IMPORTING limit_of_functions, continuous_functions[T2] f : VAR [T1 -> T2] g : VAR [T2 -> real] x, y : VAR real z : VAR T2 l : VAR real adherence_lemma : LEMMA convergence(f, x, y) IMPLIES adh[T2](fullset[real])(y) adherence_lemma2 : LEMMA convergent(f, x) IMPLIES adh[T2](fullset[real])(lim(f, x)) convergence_composition : PROPOSITION convergence(f, x, y) AND convergence(g, y, l) IMPLIES convergence(g o f, x, l) convergent_composition : PROPOSITION convergent(f, x) AND convergent(g, lim(f, x)) IMPLIES convergent(g o f, x) limit_composition : PROPOSITION convergent(f, x) AND convergent(g, lim(f, x)) IMPLIES lim(g o f, x) = lim(g, lim(f, x)) convergence_comp_continuous : PROPOSITION convergence(f, x, z) AND continuous(g, z) IMPLIES convergence(g o f, x, g(z)) convergent_comp_continuous : PROPOSITION convergent(f, x) AND T2_pred(lim(f, x)) AND continuous(g, lim(f, x)) IMPLIES convergent(g o f, x) limit_comp_continuous : PROPOSITION convergent(f, x) AND T2_pred(lim(f, x)) AND continuous(g, lim(f, x)) IMPLIES lim(g o f, x) = g(lim(f, x)) END limit_of_composition \$\$\$limit_of_composition.prf (|limit_of_composition| (|adherence_lemma| "" (GRIND :EXCLUDE ("convergence" "abs") :REWRITES ("adh[T1]" "adh[T2]" "convergence_def[T1]") :IF-MATCH NIL) (("" (INST? -6) (("" (SKOLEM!) (("" (INST -5 "delta!1") (("" (SKOLEM!) (("" (INST?) (("" (INST?) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|adherence_lemma2| "" (SKOSIMP) (("" (USE "lim_fun_lemma[T1]") (("" (FORWARD-CHAIN "adherence_lemma") NIL NIL)) NIL)) NIL) (|convergence_composition| "" (GRIND :EXCLUDE ("convergence" "abs" "adh") :REWRITES ("convergence_def[T2]" "convergence_def[T1]") :IF-MATCH NIL) (("" (DELETE -1 -2 -3 -4 -5 -6 -8) (("" (INST -2 "epsilon!1") (("" (SKOLEM!) (("" (INST -1 "delta!1") (("" (SKOLEM!) (("" (INST 1 "delta!2") (("" (SKOSIMP) (("" (INST?) (("" (INST?) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergent_composition| "" (LEMMA "convergence_composition") (("" (GRIND :DEFS NIL :REWRITES ("convergent[T1]" "convergent[T2]")) (("" (REWRITE "lim_fun_def[T1]" :DIR RL) (("" (INST?) NIL NIL)) NIL)) NIL)) NIL) (|limit_composition_TCC1| "" (SKOSIMP) (("" (REWRITE "convergent_composition") NIL NIL)) NIL) (|limit_composition| "" (SKOSIMP) (("" (ASSERT) (("" (AUTO-REWRITE "adherence_lemma2" "convergent_composition") (("" (REWRITE "lim_fun_def[T1]") (("" (USE "lim_fun_lemma[T2]") (("" (USE "lim_fun_lemma[T1]" ("f" "f!1")) (("" (FORWARD-CHAIN "convergence_composition") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_comp_continuous| "" (SKOSIMP) (("" (EXPAND "continuous") (("" (FORWARD-CHAIN "convergence_composition") NIL NIL)) NIL)) NIL) (|convergent_comp_continuous| "" (SKOSIMP) (("" (ASSERT) (("" (AUTO-REWRITE "lim_fun_lemma[T1]") (("" (USE "convergence_comp_continuous" ("z" "lim(f!1, x!1)")) (("" (ASSERT) (("" (EXPAND "convergent" +) (("" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_comp_continuous_TCC1| "" (SKOSIMP) (("" (REWRITE "convergent_comp_continuous") NIL NIL)) NIL) (|limit_comp_continuous| "" (SKOSIMP) (("" (ASSERT) (("" (AUTO-REWRITE "convergent_comp_continuous") (("" (REWRITE "lim_fun_def[T1]") (("" (USE "lim_fun_lemma[T1]") (("" (FORWARD-CHAIN "convergence_comp_continuous") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) \$\$\$chain_rule.pvs chain_rule [ T1, T2 : TYPE FROM real ] : THEORY BEGIN ASSUMING connected_domain1 : ASSUMPTION FORALL (x, y : T1), (z : real) : x <= z AND z <= y IMPLIES T1_pred(z) not_one_element1 : ASSUMPTION FORALL (x : T1) : EXISTS (y : T1) : x /= y connected_domain2 : ASSUMPTION FORALL (x, y : T2), (z : real) : x <= z AND z <= y IMPLIES T2_pred(z) not_one_element2 : ASSUMPTION FORALL (x : T2) : EXISTS (y : T2) : x /= y ENDASSUMING IMPORTING derivative_props, limit_of_composition f : VAR [T1 -> T2] g : VAR [T2 -> real] x : VAR T1 DF, DG : VAR real chain_rule : LEMMA convergence(NQ(f, x), 0, DF) AND convergence(NQ(g, f(x)), 0, DG) IMPLIES convergence(NQ(g o f, x), 0, DG * DF) composition_derivable : LEMMA derivable(f, x) AND derivable(g, f(x)) IMPLIES derivable(g o f, x) composition_derivable2 : LEMMA derivable(f) AND derivable(g) IMPLIES derivable(g o f) deriv_composition : LEMMA derivable(f, x) AND derivable(g, f(x)) IMPLIES deriv(g o f, x) = deriv(g, f(x)) * deriv(f, x) ff : VAR { f | derivable(f) } gg : VAR { g | derivable(g) } deriv_comp_fun : LEMMA deriv(gg o ff) = (deriv(gg) o ff) * deriv(ff) END chain_rule \$\$\$chain_rule.prf (|chain_rule| (|chain_rule_TCC1| "" (LEMMA "connected_domain1") (("" (PROPAX) NIL NIL)) NIL) (|chain_rule_TCC2| "" (LEMMA "not_one_element1") (("" (PROPAX) NIL NIL)) NIL) (|chain_rule_TCC3| "" (SKOSIMP) (("" (LEMMA "connected_domain2") (("" (PROPAX) NIL NIL)) NIL)) NIL) (|chain_rule_TCC4| "" (SKOSIMP) (("" (LEMMA "not_one_element2") (("" (PROPAX) NIL NIL)) NIL)) NIL) (|chain_rule| "" (SKOSIMP) (("" (AUTO-REWRITE "deriv_TCC[T1]" "deriv_TCC[T2]" "adherence_fullset[T1]" "adherence_fullset[T2]" "not_one_element1" "not_one_element2" "connected_domain1" "connected_domain2") (("" (USE "derivative_equivalence1[T1]") (("" (GROUND) (("" (FORWARD-CHAIN "derivable_continuous[T1]") (("" (DELETE -2 -3 -4) (("" (EXPAND "continuous") (("" (REWRITE "derivative_equivalence2[T1]") (("" (REWRITE "derivative_equivalence2[T1]") (("" (REWRITE "derivative_equivalence2[T2]") (("" (SKOSIMP*) (("" (INST + "DG!1 * phi!1 + DF!1 * (phi!2 o f!1) + phi!1 * (phi!2 o f!1)") (("" (GROUND) (("1" (USE "convergence_composition" ("f" "f!1" "g" "phi!2" "x" "x!1")) (("1" (ASSERT) (("1" (DELETE -4 -5 -6) (("1" (AUTO-REWRITE-THEORY "limit_of_functions[T1]" :EXCLUDE ("convergence" "convergence_def" "convergent" "convergent_in_domain" "lim" "limit_in_domain" "lim_fun_lemma" "lim_fun_def") :ALWAYS? T) (("1" (GRIND :DEFS NIL) NIL NIL)) NIL)) NIL)) NIL)) NIL) ("2" (DELETE -1 -2 -4) (("2" (SKOLEM!) (("2" (INST -1 "y!1") (("2" (INST -2 "f!1(y!1)") (("2" (GRIND) (("2" (CASE-REPLACE "f!1(y!1) * phi!2(f!1(y!1)) + f!1(y!1) * DG!1 - f!1(x!1) * DG!1 - phi!2(f!1(y!1)) * f!1(x!1) = (f!1(y!1) - f!1(x!1)) * (phi!2(f!1(y!1)) + DG!1)") (("1" (REPLACE -2) (("1" (ASSERT) NIL NIL)) NIL) ("2" (DELETE -1 -2 2) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|composition_derivable_TCC1| "" (SKOSIMP) (("" (LEMMA "connected_domain2") (("" (PROPAX) NIL NIL)) NIL)) NIL) (|composition_derivable_TCC2| "" (SKOSIMP) (("" (LEMMA "not_one_element2") (("" (PROPAX) NIL NIL)) NIL)) NIL) (|composition_derivable| "" (EXPAND "derivable") (("" (EXPAND "convergent") (("" (SKOSIMP*) (("" (FORWARD-CHAIN "chain_rule") (("" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|composition_derivable2_TCC1| "" (SKOSIMP) (("" (LEMMA "connected_domain2") (("" (PROPAX) NIL NIL)) NIL)) NIL) (|composition_derivable2_TCC2| "" (SKOSIMP) (("" (LEMMA "not_one_element2") (("" (PROPAX) NIL NIL)) NIL)) NIL) (|composition_derivable2| "" (EXPAND "derivable") (("" (SKOSIMP*) (("" (REWRITE "composition_derivable") (("1" (INST?) NIL NIL) ("2" (INST? -2) NIL NIL)) NIL)) NIL)) NIL) (|deriv_composition_TCC1| "" (SKOSIMP) (("" (REWRITE "composition_derivable") NIL NIL)) NIL) (|deriv_composition| "" (SKOSIMP) (("" (FORWARD-CHAIN "composition_derivable") (("" (AUTO-REWRITE "deriv_TCC[T1]" "deriv_TCC[T2]" ("deriv[T1]" "derivable[T1]" "deriv[T2]" "derivable[T2]") ("lim_fun_lemma[(A[T1](x!1))]" "lim_fun_lemma[(A[T2](f!1(x!1)))]")) (("" (ASSERT) (("" (REWRITE "lim_fun_def[(A[T1](x!1))]") (("" (REWRITE "chain_rule") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|gg_TCC1| "" (LEMMA "connected_domain2") (("" (PROPAX) NIL NIL)) NIL) (|gg_TCC2| "" (LEMMA "not_one_element2") (("" (PROPAX) NIL NIL)) NIL) (|deriv_comp_fun_TCC1| "" (SKOSIMP) (("" (REWRITE "composition_derivable2") NIL NIL)) NIL) (|deriv_comp_fun| "" (SKOLEM-TYPEPRED) (("" (ASSERT) (("" (EXPAND "derivable") (("" (AUTO-REWRITE "composition_derivable2") (("" (APPLY-EXTENSIONALITY :HIDE? T) (("" (EXPAND "*") (("" (EXPAND "o" 1 2) (("" (EXPAND "deriv") (("" (REWRITE "deriv_composition") (("1" (INST? -1) NIL NIL) ("2" (INST? -2) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) \$\$\$monotone_subsequence.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % From any sequence one can extract % % an increasing or a decreasing sub-sequence % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% monotone_subsequence : THEORY BEGIN IMPORTING sequence_props u, s : VAR sequence[real] i, j, n : VAR nat %--------------------------------------------------- % If all the suffixes of v have a minimal element % then v contains an increasing sub-sequence %--------------------------------------------------- has_minimum(u, n) : bool = EXISTS i : n <= i AND FORALL j : n <= j IMPLIES u(i) <= u(j) minimum_prefix : LEMMA EXISTS i : FORALL j : j <= n IMPLIES u(i) <= u(j) minimum_suffix : LEMMA has_minimum(u, n) IMPLIES has_minimum(u, 0) v : VAR { u | FORALL n : has_minimum(u, n) } %--- a minimum of the elements n, n+1, .... ---% mini(v, n) : nat = epsilon! i : n <= i AND FORALL j : n <= j IMPLIES v(i) <= v(j) min_prop : LEMMA n <= mini(v, n) AND FORALL j : n <= j IMPLIES v(mini(v, n)) <= v(j) min_prop1 : COROLLARY n <= mini(v, n) min_prop2 : COROLLARY n <= i IMPLIES v(mini(v, n)) <= v(i) %--- subsequence ---% h(v)(i) : RECURSIVE nat = IF i = 0 THEN mini(v, 0) ELSE mini(v, h(v)(i - 1) + 1) ENDIF MEASURE i hseq(v) : sequence[real] = LAMBDA i : v(h(v)(i)) h_increasing : LEMMA strict_increasing(h(v)) hseq_extraction : LEMMA subseq(hseq(v), v) hseq_increasing : LEMMA increasing(hseq(v)) %------------------------------------------------------ % If a sequence has no minimal element it contains a % (strictly) decreasing sub-sequence %------------------------------------------------------ w : VAR { u | not has_minimum(u, 0) } no_minimum : LEMMA not has_minimum(w, n) pick(w, n) : nat = epsilon! i : n <= i AND w(i) < w(n) pick_prop : LEMMA n <= pick(w, n) AND w(pick(w, n)) < w(n) pick_prop1 : COROLLARY n < pick(w, n) pick_prop2 : COROLLARY w(pick(w, n)) < w(n) %--- subsequence ---% g(w)(i) : RECURSIVE nat = IF i = 0 THEN pick(w, 0) ELSE pick(w, g(w)(i - 1)) ENDIF MEASURE i gseq(w) : sequence[real] = LAMBDA i : w(g(w)(i)) g_increasing : LEMMA strict_increasing(g(w)) gseq_extraction : LEMMA subseq(gseq(w), w) gseq_decreasing : LEMMA strict_decreasing(gseq(w)) %------------------------ % Suffix starting at n %------------------------ suffix(u, n) : sequence[real] = LAMBDA i : u(n+i) suffix_subseq : LEMMA subseq(suffix(u, n), u) suffix_hasmin : LEMMA has_minimum(suffix(u, n), 0) IFF has_minimum(u, n) %---------------- % Main theorem %---------------- monotone_subsequence : THEOREM EXISTS s : subseq(s, u) AND (increasing(s) OR decreasing(s)) END monotone_subsequence \$\$\$monotone_subsequence.prf (|monotone_subsequence| (|minimum_prefix| "" (SKOLEM + (_ "u!1")) (("" (INDUCT "n") (("1" (REDUCE) NIL NIL) ("2" (SKOSIMP*) (("2" (INST + "IF u!1(i!1) <= u!1(j!1+1) THEN i!1 ELSE j!1+1 ENDIF") (("2" (SKOSIMP) (("2" (INST - "j!2") (("2" (SMASH) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|minimum_suffix| "" (GRIND :IF-MATCH NIL) (("" (USE "minimum_prefix" ("n" "n!1")) (("" (SKOLEM!) (("" (INST + "IF u!1(i!2) <= u!1(i!1) THEN i!2 ELSE i!1 ENDIF") (("" (SKOLEM!) (("" (INST - "j!1") (("" (INST - "j!1") (("" (SMASH) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|min_prop| "" (SKOLEM!) (("" (NAME-REPLACE "m" "mini(v!1, n!1)" :HIDE? NIL) (("" (EXPAND "mini") (("" (USE "epsilon_ax[nat]") (("" (BETA) (("" (REPLACE -2) (("" (DELETE -2) (("" (SPLIT) (("1" (PROPAX) NIL NIL) ("2" (TYPEPRED "v!1") (("2" (INST?) (("2" (EXPAND "has_minimum") (("2" (PROPAX) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|min_prop1| "" (SKOLEM!) (("" (USE "min_prop") (("" (FLATTEN) NIL NIL)) NIL)) NIL) (|min_prop2| "" (SKOSIMP) (("" (USE "min_prop") (("" (REDUCE) NIL NIL)) NIL)) NIL) (|h_TCC1| "" (SKOSIMP) (("" (ASSERT) NIL))) (|h_TCC2| "" (SKOSIMP) (("" (ASSERT) NIL))) (|h_increasing| "" (SKOLEM!) (("" (REWRITE "strict_incr_condition") (("" (SKOLEM!) (("" (EXPAND "h" 1 2) (("" (USE "min_prop1") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|hseq_extraction| "" (SKOLEM!) (("" (EXPAND* "hseq" "subseq") (("" (INST + "h(v!1)") (("1" (ASSERT) NIL NIL) ("2" (REWRITE "h_increasing") NIL NIL)) NIL)) NIL)) NIL) (|hseq_increasing| "" (SKOLEM!) (("" (REWRITE "incr_condition") (("" (SKOLEM!) (("" (EXPAND "hseq") (("" (NAME-REPLACE "k" "h(v!1)(i!1)" :HIDE? NIL) (("" (EXPAND "h" -1) (("" (SMASH) (("1" (USE "min_prop2" ("i" "h(v!1)(1 + i!1)")) (("1" (ASSERT) NIL NIL)) NIL) ("2" (USE "min_prop2" ("i" "h(v!1)(1 + i!1)")) (("2" (ASSERT) (("2" (USE "h_increasing") (("2" (EXPAND "strict_increasing") (("2" (INST - "i!1 - 1" "1 + i!1") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|no_minimum| "" (SKOLEM-TYPEPRED) (("" (FORWARD-CHAIN "minimum_suffix") NIL NIL)) NIL) (|pick_prop| "" (SKOLEM!) (("" (NAME-REPLACE "k" "pick(w!1, n!1)" :HIDE? NIL) (("" (EXPAND "pick") (("" (LEMMA "epsilon_ax" ("p" "LAMBDA (i : nat) : n!1 <= i AND w!1(i) < w!1(n!1)")) (("" (REPLACE -2) (("" (ASSERT) (("" (SPLIT) (("1" (PROPAX) NIL NIL) ("2" (DELETE -1 2) (("2" (USE "no_minimum" ("n" "n!1")) (("2" (EXPAND "has_minimum") (("2" (INST?) (("2" (ASSERT) (("2" (SKOSIMP) (("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|pick_prop1| "" (SKOLEM!) (("" (USE "pick_prop") (("" (GROUND) NIL))))) (|pick_prop2| "" (SKOLEM!) (("" (USE "pick_prop") (("" (FLATTEN) (("" (PROPAX) NIL))))))) (|g_TCC1| "" (SKOSIMP) (("" (ASSERT) NIL))) (|g_TCC2| "" (ASSERT) NIL) (|g_increasing| "" (SKOLEM!) (("" (REWRITE "strict_incr_condition") (("" (SKOLEM!) (("" (EXPAND "g" 1 2) (("" (REWRITE "pick_prop1") NIL NIL)) NIL)) NIL)) NIL)) NIL) (|gseq_extraction| "" (SKOLEM!) (("" (EXPAND* "subseq" "gseq") (("" (INST + "g(w!1)") (("1" (ASSERT) NIL NIL) ("2" (REWRITE "g_increasing") NIL NIL)) NIL)) NIL)) NIL) (|gseq_decreasing| "" (SKOLEM!) (("" (REWRITE "strict_decr_condition") (("" (SKOLEM!) (("" (EXPAND "gseq") (("" (EXPAND "g" 1 1) (("" (REWRITE "pick_prop2") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|suffix_subseq| "" (GRIND :IF-MATCH NIL) (("" (INST + "LAMBDA i : i+n!1") (("1" (ASSERT) NIL NIL) ("2" (SKOSIMP) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) (|suffix_hasmin| "" (GRIND :IF-MATCH NIL) (("1" (INST? +) (("1" (ASSERT) (("1" (SKOSIMP) (("1" (INST - "j!1 - n!1") (("1" (ASSERT) NIL NIL) ("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) ("2" (INST + "i!1 - n!1") (("2" (SKOSIMP) (("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|monotone_subsequence| "" (SKOSIMP) (("" (AUTO-REWRITE "strict_decr_to_decr[nat]" "gseq_decreasing") (("" (CASE "FORALL n : has_minimum(u!1, n)") (("1" (ASSERT) (("1" (INST + "hseq(u!1)") (("1" (GROUND) (("1" (REWRITE "hseq_extraction") NIL NIL) ("2" (REWRITE "hseq_increasing") NIL NIL)) NIL)) NIL)) NIL) ("2" (SKOLEM!) (("2" (REWRITE "suffix_hasmin" :DIR RL) (("2" (ASSERT) (("2" (INST + "gseq(suffix(u!1, n!1))") (("2" (GROUND) (("2" (USE "gseq_extraction") (("2" (USE "suffix_subseq") (("2" (FORWARD-CHAIN "transitive_subseq") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) \$\$\$real_fun_props.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Defines several properties of functions [T -> real] % % -> increasing/decreasing functions % % -> upper/lower bound % % -> maximum/minimum of a function % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% real_fun_props [T : TYPE FROM real] : THEORY BEGIN IMPORTING real_fun_ops f : VAR [T -> real] x, y : VAR T a, z : VAR real E : VAR setof[real] %--------------------------------------- % Increasing and decreasing functions %--------------------------------------- increasing(f) : bool = FORALL x, y : x <= y IMPLIES f(x) <= f(y) decreasing(f) : bool = FORALL x, y : x <= y IMPLIES f(y) <= f(x) strict_increasing(f) : bool = FORALL x, y : x < y IMPLIES f(x) < f(y) strict_decreasing(f) : bool = FORALL x, y : x < y IMPLIES f(y) < f(x) %------------------- % Easy properties %------------------- strict_incr_to_incr : LEMMA strict_increasing(f) IMPLIES increasing(f) strict_decr_to_decr : LEMMA strict_decreasing(f) IMPLIES decreasing(f) incr_opposite : LEMMA increasing(- f) IFF decreasing(f) decr_opposite : LEMMA decreasing(- f) IFF increasing(f) strict_incr_opposite : LEMMA strict_increasing(- f) IFF strict_decreasing(f) strict_decr_opposite : LEMMA strict_decreasing(- f) IFF strict_increasing(f) %----------------------- % Constant functions %----------------------- constant(f) : bool = FORALL x, y : f(x) = f(y) constant_to_incr : LEMMA constant(f) IMPLIES increasing(f) constant_to_decr : LEMMA constant(f) IMPLIES decreasing(f) constant_opposite : LEMMA constant(- f) IFF constant(f) %-------------------------------------------------------- % Image of a function % redefined from function_image to avoid conversions %-------------------------------------------------------- Im(f) : setof[real] = { z | EXISTS x : z = f(x) } Im(f, E) : setof[real] = { z | EXISTS x : E(x) AND z = f(x) } %--------------------- % Bounded functions %--------------------- bounded_above?(f) : bool = EXISTS a: FORALL x: f(x) <= a bounded_below?(f) : bool = EXISTS a: FORALL x: a <= f(x) bounded?(f) : bool = bounded_above?(f) AND bounded_below?(f) %------------------------ % Relation to opposite %------------------------ bounded_above_opposite : LEMMA bounded_above?(- f) IFF bounded_below?(f) bounded_below_opposite : LEMMA bounded_below?(- f) IFF bounded_above?(f) %----------------------------------- % Maximum / minimum of a function %----------------------------------- is_maximum(x, f) : bool = FORALL y : f(y) <= f(x) is_minimum(x, f) : bool = FORALL y : f(x) <= f(y) %------------------------ % Relation with bounds %------------------------ max_bounded : LEMMA is_maximum(x, f) IMPLIES bounded_above?(f) min_bounded : LEMMA is_minimum(x, f) IMPLIES bounded_below?(f) %--------------------------- % Relation with opposites %--------------------------- max_opposite : LEMMA is_maximum(x, - f) IFF is_minimum(x, f) min_opposite : LEMMA is_minimum(x, - f) IFF is_maximum(x, f) END real_fun_props \$\$\$real_fun_props.prf (|real_fun_props| (|strict_incr_to_incr| "" (GRIND :IF-MATCH NIL) (("" (INST -3 "x!1" "y!1") (("" (ASSERT) NIL NIL)) NIL)) NIL) (|strict_decr_to_decr| "" (GRIND :IF-MATCH NIL) (("" (INST -3 "x!1" "y!1") (("" (ASSERT) NIL NIL)) NIL)) NIL) (|incr_opposite| "" (GRIND) NIL NIL) (|decr_opposite| "" (GRIND) NIL NIL) (|strict_incr_opposite| "" (GRIND) NIL NIL) (|strict_decr_opposite| "" (GRIND) NIL NIL) (|constant_to_incr| "" (GRIND :IF-MATCH ALL) NIL NIL) (|constant_to_decr| "" (GRIND :IF-MATCH ALL) NIL NIL) (|constant_opposite| "" (GRIND :IF-MATCH ALL) NIL NIL) (|bounded_above_opposite| "" (GRIND :IF-MATCH NIL) (("1" (INST + "-a!1") (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) ("2" (INST + "-a!1") (("2" (SKOLEM!) (("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|bounded_below_opposite| "" (GRIND :IF-MATCH NIL) (("1" (INST + "-a!1") (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) ("2" (INST + "-a!1") (("2" (SKOLEM!) (("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|max_bounded| "" (GRIND :IF-MATCH NIL) (("" (INST? +) NIL NIL)) NIL) (|min_bounded| "" (GRIND :IF-MATCH NIL) (("" (INST? +) NIL NIL)) NIL) (|max_opposite| "" (GRIND :IF-MATCH NIL) (("1" (INST -3 "y!1") (("1" (ASSERT) NIL NIL)) NIL) ("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL) (|min_opposite| "" (AUTO-REWRITE "negneg_function[T]") (("" (SKOLEM!) (("" (REWRITE "max_opposite" :DIR RL) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) \$\$\$real_fun_supinf.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Sup and Inf of bounded functions % % (require nonempty domain) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% real_fun_supinf [ T : NONEMPTY_TYPE FROM real ] : THEORY BEGIN IMPORTING real_fun_props, real_facts f : VAR [T -> real] x : VAR T a : VAR real epsilon : VAR posreal %--------------- % Sup and Inf %--------------- g : VAR { f | bounded_above?(f) } h : VAR { f | bounded_below?(f) } nonempty_image: JUDGEMENT Im(f) HAS_TYPE (nonempty?[real]) bounded_above_image: JUDGEMENT Im(g) HAS_TYPE (bounded_above?) bounded_below_image: JUDGEMENT Im(h) HAS_TYPE (bounded_below?) sup(g) : real = lub(Im(g)) inf(h) : real = glb(Im(h)) %-------------- % Properties %-------------- supfun_is_bound : LEMMA g(x) <= sup(g) supfun_is_sup : LEMMA FORALL epsilon : EXISTS x : sup(g) - epsilon < g(x) supfun_is_sup2 : LEMMA sup(g) <= a IFF FORALL x : g(x) <= a inffun_is_bound : LEMMA inf(h) <= h(x) inffun_is_inf : LEMMA FORALL epsilon : EXISTS x : h(x) < inf(h) + epsilon inffun_is_inf2 : LEMMA a <= inf(h) IFF FORALL x : a <= h(x) supfun_opposite : LEMMA sup(- h) = - inf(h) inffun_opposite : LEMMA inf(- g) = - sup(g) %-------------------------------------- % Relations with maximum and minimum %-------------------------------------- max_upper_bound : LEMMA is_maximum(x, f) IFF bounded_above?(f) AND sup(f) = f(x) min_lower_bound : LEMMA is_minimum(x, f) IFF bounded_below?(f) AND inf(f) = f(x) END real_fun_supinf \$\$\$real_fun_supinf.prf (|real_fun_supinf| (|nonempty_image| "" (GRIND) (("" (INST - "f!1(epsilon! x: true)") (("" (INST?) NIL NIL)) NIL)) NIL) (|bounded_above_image| "" (GRIND :IF-MATCH NIL) (("" (INST + "a!1") (("" (REDUCE :IF-MATCH NIL) (("" (INST?) NIL NIL)) NIL)) NIL)) NIL) (|bounded_below_image| "" (GRIND :IF-MATCH NIL) (("" (INST + "a!1") (("" (REDUCE :IF-MATCH NIL) (("" (INST?) NIL NIL)) NIL)) NIL)) NIL) (|supfun_is_bound| "" (SKOLEM!) (("" (EXPAND "sup") (("" (REWRITE "lub_is_bound") (("" (DELETE 2) (("" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|supfun_is_sup| "" (SKOSIMP) (("" (EXPAND "sup") (("" (USE "adherence_sup") (("" (AUTO-REWRITE "Im") (("" (APPLY (THEN (REDUCE :IF-MATCH NIL) (INST?) (ASSERT))) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|supfun_is_sup2| "" (SKOLEM!) (("" (EXPAND "sup") (("" (REWRITE "lub_is_lub") (("" (GRIND :IF-MATCH NIL) (("1" (INST?) (("1" (INST?) NIL NIL)) NIL) ("2" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|inffun_is_bound| "" (SKOLEM!) (("" (EXPAND "inf") (("" (REWRITE "glb_is_bound") (("" (DELETE 2) (("" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|inffun_is_inf| "" (SKOSIMP) (("" (EXPAND "inf") (("" (USE "adherence_inf") (("" (AUTO-REWRITE "Im") (("" (APPLY (THEN (REDUCE :IF-MATCH NIL) (INST?) (ASSERT))) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|inffun_is_inf2| "" (SKOLEM!) (("" (EXPAND "inf") (("" (REWRITE "glb_is_glb") (("" (GRIND :IF-MATCH NIL) (("1" (INST?) (("1" (INST?) NIL NIL)) NIL) ("2" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|supfun_opposite_TCC1| "" (SKOLEM!) (("" (REWRITE "bounded_above_opposite[T]") NIL NIL)) NIL) (|supfun_opposite| "" (SKOLEM!) (("" (AUTO-REWRITE "supfun_opposite_TCC1" "-") (("" (USE "supfun_is_sup2") (("" (USE "inffun_is_inf2" ("a" "- sup(- h!1)")) (("" (GROUND) (("1" (SKOLEM!) (("1" (USE "inffun_is_bound") (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (SKOLEM!) (("2" (USE "supfun_is_bound" ("g" "-h!1")) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|inffun_opposite_TCC1| "" (SKOLEM!) (("" (REWRITE "bounded_below_opposite[T]") NIL NIL)) NIL) (|inffun_opposite| "" (SKOLEM!) (("" (AUTO-REWRITE "inffun_opposite_TCC1" "-") (("" (USE "inffun_is_inf2") (("" (USE "supfun_is_sup2" ("a" "- inf(- g!1)")) (("" (GROUND) (("1" (SKOLEM!) (("1" (USE "supfun_is_bound") (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (SKOLEM!) (("2" (USE "inffun_is_bound" ("h" "-g!1")) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|max_upper_bound| "" (SKOLEM!) (("" (SPLIT) (("1" (FLATTEN) (("1" (FORWARD-CHAIN "max_bounded[T]") (("1" (ASSERT) (("1" (USE "supfun_is_bound") (("1" (EXPAND "is_maximum") (("1" (USE "supfun_is_sup2" ("g" "f!1")) (("1" (GROUND) NIL))))))))))))) ("2" (FLATTEN) (("2" (ASSERT) (("2" (EXPAND "is_maximum") (("2" (REPLACE -2 + RL) (("2" (LEMMA "supfun_is_bound" ("g" "f!1")) (("2" (PROPAX) NIL))))))))))))))) (|min_lower_bound| "" (SKOLEM!) (("" (SPLIT) (("1" (FLATTEN) (("1" (FORWARD-CHAIN "min_bounded[T]") (("1" (ASSERT) (("1" (USE "inffun_is_bound") (("1" (EXPAND "is_minimum") (("1" (USE "inffun_is_inf2" ("h" "f!1")) (("1" (GROUND) NIL))))))))))))) ("2" (FLATTEN) (("2" (ASSERT) (("2" (EXPAND "is_minimum") (("2" (REPLACE -2 + RL) (("2" (LEMMA "inffun_is_bound" ("h" "f!1")) (("2" (PROPAX) NIL)))))))))))))))) \$\$\$sequence_props.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Properties of real sequences % % -> condition for increasing / decreasing % % -> subsequences % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% sequence_props : THEORY BEGIN IMPORTING real_fun_supinf u, v, w : VAR sequence[real] i, j : VAR nat a, x : VAR real %-------------------------------------------------- % Conditions for increasing/decreasing sequences %-------------------------------------------------- incr_condition : LEMMA increasing(u) IFF FORALL i : u(i) <= u(i+1) decr_condition : LEMMA decreasing(u) IFF FORALL i : u(i+1) <= u(i) strict_incr_condition : LEMMA strict_increasing(u) IFF FORALL i : u(i) < u(i+1) strict_decr_condition : LEMMA strict_decreasing(u) IFF FORALL i : u(i+1) < u(i) %------------------------------------------------------- % Increasing sequences of natural numbers % used for extracting a sub-sequence from a sequence %------------------------------------------------------- extraction : TYPE = { f : [nat -> nat] | strict_increasing(f) } f, g : VAR extraction extract_incr1 : LEMMA f(i) < f(j) IFF i < j extract_incr2 : LEMMA i <= j IMPLIES f(i) <= f(j) extract_incr3 : LEMMA i <= f(i) unbounded_extract1 : LEMMA EXISTS j : i <= f(j) unbounded_extract2 : LEMMA EXISTS j : i < f(j) extract_composition : LEMMA strict_increasing(g o f) %----------------- % Sub-sequences %----------------- subseq(u, v) : bool = EXISTS f : FORALL i : u(i) = v(f(i)) reflexive_subseq : LEMMA subseq(u, u) transitive_subseq : LEMMA subseq(u, v) AND subseq(v, w) IMPLIES subseq(u, w) %----------------------------------------- % Properties inherited by subsequences %----------------------------------------- incr_subseq : LEMMA increasing(v) AND subseq(u, v) IMPLIES increasing(u) decr_subseq : LEMMA decreasing(v) AND subseq(u, v) IMPLIES decreasing(u) strict_incr_subseq : LEMMA strict_increasing(v) AND subseq(u, v) IMPLIES strict_increasing(u) strict_decr_subseq : LEMMA strict_increasing(v) AND subseq(u, v) IMPLIES strict_increasing(u) bounded_above_subseq : LEMMA bounded_above?(v) AND subseq(u, v) IMPLIES bounded_above?(u) bounded_below_subseq : LEMMA bounded_below?(v) AND subseq(u, v) IMPLIES bounded_below?(u) bounded_subseq : LEMMA bounded?(v) AND subseq(u, v) IMPLIES bounded?(u) END sequence_props \$\$\$sequence_props.prf (|sequence_props| (|incr_condition| "" (SKOLEM!) (("" (EXPAND "increasing") (("" (PROP) (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (INDUCT "y") (("1" (SKOSIMP) (("1" (ASSERT) NIL NIL)) NIL) ("2" (SKOSIMP*) (("2" (INST -1 "x!1") (("2" (INST -3 "j!1") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|decr_condition| "" (SKOLEM!) (("" (EXPAND "decreasing") (("" (PROP) (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (INDUCT "y") (("1" (SKOSIMP) (("1" (ASSERT) NIL NIL)) NIL) ("2" (SKOSIMP*) (("2" (INST -1 "x!1") (("2" (INST -3 "j!1") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|strict_incr_condition| "" (SKOLEM!) (("" (EXPAND "strict_increasing") (("" (PROP) (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (INDUCT "y") (("1" (SKOSIMP) (("1" (ASSERT) NIL NIL)) NIL) ("2" (SKOSIMP*) (("2" (INST -1 "x!1") (("2" (INST -3 "j!1") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|strict_decr_condition| "" (SKOLEM!) (("" (EXPAND "strict_decreasing") (("" (PROP) (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (INDUCT "y") (("1" (SKOSIMP) (("1" (ASSERT) NIL NIL)) NIL) ("2" (SKOSIMP*) (("2" (INST -1 "x!1") (("2" (INST -3 "j!1") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|extract_incr1| "" (GRIND :IF-MATCH NIL) (("1" (INST -1 "j!1" "i!1") (("1" (ASSERT) NIL NIL)) NIL) ("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL) (|extract_incr2| "" (SKOSIMP) (("" (USE "extract_incr1" ("i" "j!1" "j" "i!1")) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|extract_incr3| "" (SKOLEM 1 ("f!1" _)) (("" (INDUCT "i") (("1" (ASSERT) NIL NIL) ("2" (SKOSIMP) (("2" (USE "extract_incr1" ("i" "j!1" "j" "j!1+1")) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|unbounded_extract1| "" (SKOLEM!) (("" (INST?) (("" (REWRITE "extract_incr3") NIL NIL)) NIL)) NIL) (|unbounded_extract2| "" (SKOSIMP) (("" (USE "unbounded_extract1" ("f" "f!1")) (("" (SKOLEM!) (("" (INST 1 "j!1+1") (("" (USE "extract_incr1" ("i" "j!1" "j" "j!1+1")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|extract_composition| "" (AUTO-REWRITE "strict_increasing" "o") (("" (GRIND) NIL NIL)) NIL) (|reflexive_subseq| "" (SKOLEM!) (("" (EXPAND "subseq") (("" (INST 1 "I") (("1" (EXPAND "I") (("1" (PROPAX) NIL NIL)) NIL) ("2" (GRIND) NIL NIL)) NIL)) NIL)) NIL) (|transitive_subseq| "" (EXPAND "subseq") (("" (SKOSIMP*) (("" (INST 1 "f!2 o f!1") (("1" (GRIND) NIL NIL) ("2" (REWRITE "extract_composition") NIL NIL)) NIL)) NIL)) NIL) (|incr_subseq| "" (GRIND :IF-MATCH NIL) (("" (INST-CP -5 "x!1") (("" (INST -5 "y!1") (("" (REPLACE*) (("" (INST? -4) (("" (ASSERT) (("" (INST -3 "x!1" "y!1") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|decr_subseq| "" (GRIND :IF-MATCH NIL) (("" (INST-CP -5 "x!1") (("" (INST -5 "y!1") (("" (INST -3 "x!1" "y!1") (("" (INST -4 "f!1(x!1)" "f!1(y!1)") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|strict_incr_subseq| "" (GRIND :IF-MATCH NIL) (("" (INST-CP -5 "x!1") (("" (INST -5 "y!1") (("" (INST -3 "x!1" "y!1") (("" (INST -4 "f!1(x!1)" "f!1(y!1)") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|strict_decr_subseq| "" (GRIND :IF-MATCH NIL) (("" (INST-CP -5 "x!1") (("" (INST -5 "y!1") (("" (INST -3 "x!1" "y!1") (("" (INST -4 "f!1(x!1)" "f!1(y!1)") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|bounded_above_subseq| "" (GRIND :IF-MATCH NIL) (("" (INST? +) (("" (SKOLEM!) (("" (INST? -4) (("" (INST? -3) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|bounded_below_subseq| "" (GRIND :IF-MATCH NIL) (("" (INST? +) (("" (SKOLEM!) (("" (INST? -4) (("" (INST? -3) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|bounded_subseq| "" (EXPAND "bounded?") (("" (SKOSIMP) (("" (FORWARD-CHAIN "bounded_above_subseq") (("" (FORWARD-CHAIN "bounded_below_subseq") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) \$\$\$convergence_sequences.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Definition and properties of % % convergent sequences of reals % % -> limit of a sequence, % % -> point of accumulation % % -> cauchy criterion % % -> Bolzano-Weierstrass theorem % % -> completeness of the reals % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% convergence_sequences : THEORY BEGIN IMPORTING sequence_props, absolute_value, monotone_subsequence u, u1, u2 : VAR sequence[real] l, l1, l2 : VAR real a, b, c, x : VAR real epsilon : VAR posreal i, j, n, m : VAR nat %-------------------- % Convergence to l %-------------------- convergence(u, l) : bool = FORALL epsilon : EXISTS n : FORALL i : i >= n IMPLIES abs(u(i) - l) < epsilon %------------------------- % Point of accumulation %------------------------- accumulation(u, a) : bool = FORALL epsilon, n : EXISTS i : i >= n AND abs(u(i) - a) < epsilon %-------------------- % Cauchy sequence %-------------------- cauchy(u) : bool = FORALL epsilon : EXISTS n : FORALL i, j : i >= n AND j >= n IMPLIES abs(u(i) - u(j)) < epsilon %----------------------- % The limit is unique %----------------------- unique_limit : PROPOSITION convergence(u, l1) AND convergence(u, l2) IMPLIES l1 = l2 %--------------------------------- % Limit of convergent sequences %--------------------------------- convergent(u) : bool = EXISTS l : convergence(u, l) v : VAR (convergent) limit(v) : real = epsilon(LAMBDA l : convergence(v, l)) limit_lemma : LEMMA convergence(v, limit(v)) limit_def : PROPOSITION limit(v) = l IFF convergence(v, l) %-------------------------------------------------------- % A subsequence of a convergent sequence is convergent %-------------------------------------------------------- convergence_subsequence : PROPOSITION convergence(u1, l) AND subseq(u2, u1) IMPLIES convergence(u2, l) %---------------------------------------- % The limit is a point of accumulation %---------------------------------------- limit_accumulation : PROPOSITION convergence(u, l) IMPLIES accumulation(u, l) %------------------------------------------------------------------ % a is a point of accumulation iff a sub-sequence converges to a %------------------------------------------------------------------ %--- extraction ---% g(u, a)(n) : RECURSIVE nat = IF n = 0 THEN 0 ELSE epsilon! i : g(u, a)(n - 1) < i AND abs(u(i) - a) < 1/n ENDIF MEASURE n %--- property of g when a is an accumulation point of a ---% g_prop : LEMMA accumulation(u, a) IMPLIES FORALL n : g(u, a)(n) < g(u, a)(n+1) AND abs(u(g(u, a)(n + 1)) - a) < 1/(n + 1) g_increasing : COROLLARY accumulation(u, a) IMPLIES strict_increasing(g(u, a)) g_convergence : COROLLARY accumulation(u, a) IMPLIES FORALL n : abs(u(g(u, a)(n + 1)) - a) < 1/(n + 1) %--- main theorem ---% accumulation_subsequence : THEOREM accumulation(u, a) IFF EXISTS u1 : subseq(u1, u) AND convergence(u1, a) %------------------------------------------------------------- % a point of accumulation of a Cauchy sequence is its limit %------------------------------------------------------------- cauchy_accumulation : THEOREM cauchy(u) AND accumulation(u, a) IMPLIES convergence(u, a) cauchy_subsequence : COROLLARY cauchy(u) AND subseq(u1, u) AND convergence(u1, l) IMPLIES convergence(u, l) %---------------------------------------------- % Monotone, bounded sequences are convergent %---------------------------------------------- v1 : VAR { u | bounded_above?(u) } v2 : VAR { u | bounded_below?(u) } increasing_bounded_convergence : PROPOSITION increasing(v1) IMPLIES convergence(v1, sup(v1)) decreasing_bounded_convergence : PROPOSITION decreasing(v2) IMPLIES convergence(v2, inf(v2)) %-------------------------------------------------- % Bolzano-Weierstrass theorem: % a bounded sequence has a point of accumulation %-------------------------------------------------- %--- bounded sequence ---% w : VAR { u | bounded_above?(u) AND bounded_below?(u) } %--- Bolzano/Weirstrass theorem ---% bolzano_weierstrass1 : COROLLARY EXISTS a : inf(w) <= a AND a <= sup(w) AND accumulation(w, a) bolzano_weierstrass2 : COROLLARY EXISTS a : accumulation(w, a) bolzano_weierstrass3 : COROLLARY EXISTS u : subseq(u, w) AND convergent(u) bolzano_weierstrass4 : COROLLARY (FORALL i : a <= u(i) AND u(i) <= b) IMPLIES (EXISTS c : a <= c AND c <= b AND accumulation(u, c)) %-------------------------------- % A Cauchy sequence is bounded %-------------------------------- prefix_bounded1 : LEMMA EXISTS a : FORALL i : i <= n IMPLIES u(i) <= a prefix_bounded2 : LEMMA EXISTS a : FORALL i : i <= n IMPLIES a <= u(i) cauchy_bounded : PROPOSITION cauchy(u) IMPLIES bounded_above?(u) AND bounded_below?(u) %-------------------------------------------------- % Completeness : a Cauchy sequence is convergent %-------------------------------------------------- convergence_cauchy1 : LEMMA convergent(u) IMPLIES cauchy(u) convergence_cauchy2 : LEMMA cauchy(u) IMPLIES convergent(u) convergence_cauchy : THEOREM convergent(u) IFF cauchy(u) END convergence_sequences \$\$\$convergence_sequences.prf (|convergence_sequences| (|unique_limit| "" (SKOSIMP) (("" (EXPAND "convergence") (("" (REWRITE "null_distance") (("" (NAME "eps" "abs(l1!1 - l2!1)/3") (("" (ASSERT) (("" (INST -2 "eps") (("" (INST -3 "eps") (("" (SKOLEM!) (("" (SKOLEM!) (("" (INST -2 "n!1+n!2") (("" (INST -3 "n!1+n!2") (("" (ASSERT) (("" (LEMMA "triangle2") (("" (INST -1 "eps" "eps" "l1!1" "u!1(n!1+n!2)" "l2!1") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_lemma| "" (SKOLEM-TYPEPRED) (("" (NAME-REPLACE "ll" "limit(v!1)" :HIDE? NIL) (("" (EXPAND "limit") (("" (EXPAND "convergent") (("" (LEMMA "epsilon_ax" ("p" "LAMBDA (l: real): convergence(v!1, l)")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_def| "" (SKOLEM!) (("" (USE "limit_lemma") (("" (GROUND) (("" (USE "unique_limit") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_subsequence| "" (GRIND :DEFS NIL :REWRITES ("subseq" "convergence") :IF-MATCH NIL) (("" (DELETE -1 -2 -3 -4) (("" (INST -1 "epsilon!1") (("" (SKOLEM!) (("" (INST 1 "n!1") (("" (SKOSIMP) (("" (INST? -2) (("" (REPLACE -2) (("" (INST?) (("" (ASSERT) (("" (USE "extract_incr3") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_accumulation| "" (GRIND :DEFS NIL :REWRITES ("convergence" "accumulation") :IF-MATCH NIL) (("" (INST?) (("" (SKOLEM!) (("" (INST -5 "n!1+n!2") (("" (INST 1 "n!1+n!2") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|g_TCC1| "" (SKOSIMP) (("" (ASSERT) NIL NIL)) NIL) (|g_TCC2| "" (SKOSIMP) (("" (ASSERT) NIL NIL)) NIL) (|g_TCC3| "" (SKOSIMP*) NIL NIL) (|g_prop| "" (SKOSIMP*) (("" (EXPAND "accumulation") (("" (NAME-REPLACE "y" "g(u!1, a!1)(n!1 + 1)" :HIDE? NIL) (("" (EXPAND "g" -1) (("" (ASSERT) (("" (LEMMA "epsilon_ax" ("p" "LAMBDA (i: nat): g(u!1, a!1)(n!1) < i AND abs(u!1(i) - a!1) < 1 / (1 + n!1)")) (("" (REPLACE -2) (("" (ASSERT) (("" (SPLIT -1) (("1" (PROPAX) NIL NIL) ("2" (INST -2 "1/(1+n!1)" "g(u!1, a!1)(n!1) + 1") (("2" (SKOSIMP) (("2" (INST 1 "i!1") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|g_increasing| "" (SKOSIMP) (("" (REWRITE "strict_incr_condition") (("" (SKOLEM!) (("" (FORWARD-CHAIN "g_prop") (("" (INST?) (("" (GROUND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|g_convergence| "" (SKOSIMP*) (("" (FORWARD-CHAIN "g_prop") (("" (INST -1 "n!1") (("" (FLATTEN) NIL NIL)) NIL)) NIL)) NIL) (|accumulation_subsequence| "" (SKOLEM!) (("" (PROP) (("1" (INST 1 "LAMBDA (i : nat) : u!1(g(u!1, a!1)(i))") (("1" (SPLIT) (("1" (FORWARD-CHAIN "g_increasing") (("1" (EXPAND "subseq") (("1" (INST 1 "g(u!1, a!1)") (("1" (SKOLEM!) NIL NIL)) NIL)) NIL)) NIL) ("2" (FORWARD-CHAIN "g_convergence") (("2" (EXPAND "convergence") (("2" (SKOLEM!) (("2" (LEMMA "archimedean2" ("x" "epsilon!1")) (("2" (SKOLEM!) (("2" (INST 1 "a!2") (("2" (SKOSIMP) (("2" (ASSERT) (("2" (INST -2 "i!1 - 1") (("2" (ASSERT) (("2" (CASE "1/i!1 <= 1/a!2") (("1" (ASSERT) NIL NIL) ("2" (REWRITE "both_sides_div_pos_le2") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (GRIND :DEFS NIL :REWRITES ("subseq" "convergence" "accumulation") :IF-MATCH NIL) (("2" (INST? -6) (("2" (SKOLEM!) (("2" (INST -5 "n!1 + n!2") (("2" (INST -6 "n!1+n!2") (("2" (INST?) (("2" (ASSERT) (("2" (ASSERT) (("2" (USE "extract_incr3") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|cauchy_accumulation| "" (GRIND :DEFS NIL :REWRITES ("cauchy" "accumulation" "convergence") :IF-MATCH NIL) (("" (INST -4 "epsilon!1/2") (("" (SKOLEM!) (("" (INST -5 "epsilon!1/2" "n!1") (("" (SKOSIMP) (("" (INST 1 "i!1") (("" (SKOSIMP) (("" (INST -4 "i!1" "i!2") (("" (ASSERT) (("" (LEMMA "triangle2") (("" (ASSERT) (("" (INST -1 "epsilon!1/2" "epsilon!1/2" "u!1(i!2)" "u!1(i!1)" "a!1") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|cauchy_subsequence| "" (SKOSIMP) (("" (REWRITE "cauchy_accumulation" 1) (("" (REWRITE "accumulation_subsequence") (("" (INST?) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|increasing_bounded_convergence| "" (SKOSIMP) (("" (ASSERT) (("" (GRIND :DEFS NIL :IF-MATCH NIL :REWRITES ("increasing" "convergence")) (("" (USE "supfun_is_sup[nat]") (("" (SKOLEM!) (("" (INST 1 "x!1") (("" (SKOSIMP) (("" (INST -4 "x!1" "i!1") (("" (ASSERT) (("" (USE "supfun_is_bound" ("x" "i!1")) (("" (ASSERT) (("" (EXPAND "abs") (("" (LIFT-IF) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|decreasing_bounded_convergence| "" (SKOSIMP) (("" (ASSERT) (("" (GRIND :DEFS NIL :IF-MATCH NIL :REWRITES ("decreasing" "convergence")) (("" (USE "inffun_is_inf[nat]") (("" (SKOLEM!) (("" (INST 1 "x!1") (("" (SKOSIMP) (("" (INST -4 "x!1" "i!1") (("" (ASSERT) (("" (USE "inffun_is_bound" ("x" "i!1")) (("" (ASSERT) (("" (EXPAND "abs") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|bolzano_weierstrass1| "" (SKOLEM!) (("" (USE "monotone_subsequence") (("" (SKOSIMP) (("" (USE* "bounded_above_subseq" "bounded_below_subseq") (("" (ASSERT) (("" (EXPAND "subseq") (("" (SKOLEM!) (("" (AUTO-REWRITE "supfun_is_sup2[nat]" "inffun_is_inf2[nat]" "supfun_is_bound[nat]" "inffun_is_bound[nat]" "accumulation_subsequence") (("" (GROUND) (("1" (FORWARD-CHAIN "increasing_bounded_convergence") (("1" (INST? +) (("1" (GROUND) (("1" (INST - "0") (("1" (USE "supfun_is_bound" ("g" "s!1")) (("1" (USE "inffun_is_bound" ("h" "w!1")) (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) ("2" (SKOLEM!) (("2" (INST?) (("2" (REPLACE*) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) ("3" (INST?) (("3" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) ("2" (FORWARD-CHAIN "decreasing_bounded_convergence") (("2" (INST? +) (("2" (GROUND) (("1" (SKOLEM!) (("1" (INST?) (("1" (REPLACE -5) (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) ("2" (INST - "0") (("2" (USE "inffun_is_bound" ("h" "s!1")) (("2" (USE "supfun_is_bound" ("g" "w!1")) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) ("3" (INST?) (("3" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|bolzano_weierstrass2| "" (SKOLEM!) (("" (USE "bolzano_weierstrass1") (("" (SKOSIMP) (("" (INST?) NIL NIL)) NIL)) NIL)) NIL) (|bolzano_weierstrass3| "" (SKOSIMP) (("" (USE "bolzano_weierstrass1") (("" (SKOSIMP) (("" (REWRITE "accumulation_subsequence") (("" (SKOSIMP) (("" (INST?) (("" (ASSERT) (("" (EXPAND "convergent") (("" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|bolzano_weierstrass4| "" (SKOSIMP) (("" (CASE "bounded_above?(u!1) AND bounded_below?(u!1)") (("1" (GROUND) (("1" (CASE "a!1 <= inf(u!1) AND sup(u!1) <= b!1") (("1" (GROUND) (("1" (USE "bolzano_weierstrass1") (("1" (SKOSIMP) (("1" (INST + "a!2") (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) ("2" (GROUND) (("1" (REWRITE "inffun_is_inf2[nat]") (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) ("2" (REWRITE "supfun_is_sup2[nat]") (("2" (SKOLEM!) (("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (DELETE 2) (("2" (GRIND :IF-MATCH NIL) (("1" (INST + "a!1") (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) ("2" (INST + "b!1") (("2" (SKOLEM!) (("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|prefix_bounded1| "" (SKOLEM 1 (_ "u!1")) (("" (INDUCT "n") (("1" (INST 1 "u!1(0)") (("1" (SKOSIMP) (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (SKOSIMP*) (("2" (INST 1 "max(a!1, u!1(j!1+1))") (("2" (SKOSIMP) (("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|prefix_bounded2| "" (SKOLEM 1 (_ "u!1")) (("" (INDUCT "n") (("1" (INST 1 "u!1(0)") (("1" (SKOSIMP) (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (SKOSIMP*) (("2" (INST 1 "min(a!1, u!1(j!1+1))") (("2" (SKOSIMP) (("2" (INST -1 "i!1") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|cauchy_bounded| "" (SKOSIMP) (("" (EXPAND "cauchy") (("" (INST - "1") (("" (SKOLEM!) (("" (INST - "n!1" _) (("" (AUTO-REWRITE "bounded_above?" "bounded_below?" "abs") (("" (GROUND) (("1" (USE "prefix_bounded1" ("n" "n!1")) (("1" (SKOLEM!) (("1" (INST + "a!1 + 1") (("1" (SKOLEM!) (("1" (INST-CP - "n!1") (("1" (INST - "x!1") (("1" (INST - "x!1") (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (USE "prefix_bounded2" ("n" "n!1")) (("2" (SKOLEM!) (("2" (INST + "a!1 - 1") (("2" (SKOLEM!) (("2" (INST-CP - "n!1") (("2" (INST - "x!1") (("2" (INST - "x!1") (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_cauchy1| "" (GRIND :DEFS NIL :REWRITES ("convergent" "convergence" "cauchy") :IF-MATCH NIL) (("" (DELETE -1 -2 -3) (("" (INST -1 "epsilon!1/2") (("" (SKOLEM!) (("" (INST? 1) (("" (SKOSIMP) (("" (INST-CP -1 "i!1") (("" (INST -1 "j!1") (("" (ASSERT) (("" (REWRITE "diff_abs_commute" -1) (("" (REWRITE "diff_abs_commute" -2) (("" (LEMMA "triangle2") (("" (INST -1 "epsilon!1/2" "epsilon!1/2" "u!1(j!1)" "l!1" "u!1(i!1)") (("" (ASSERT) (("" (REWRITE "diff_abs_commute" +) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_cauchy2| "" (SKOSIMP) (("" (USE "bolzano_weierstrass2") (("1" (SKOLEM!) (("1" (EXPAND "convergent") (("1" (INST?) (("1" (REWRITE "cauchy_accumulation") NIL NIL)) NIL)) NIL)) NIL) ("2" (REWRITE "cauchy_bounded") NIL NIL)) NIL)) NIL) (|convergence_cauchy| "" (SKOLEM!) (("" (PROP) (("1" (REWRITE "convergence_cauchy1") NIL NIL) ("2" (REWRITE "convergence_cauchy2") NIL NIL)) NIL)) NIL)) \$\$\$convergence_ops.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Limits and operations on sequences of reals %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% convergence_ops : THEORY BEGIN IMPORTING convergence_sequences, epsilon_lemmas s, s1, s2 : VAR sequence[real] s3 : VAR sequence[nzreal] a : VAR real l, l1, l2 : VAR real n, N : VAR nat %--------------------------------- % limits of sum, product, etc. %--------------------------------- limit_sum : PROPOSITION convergence(s1, l1) AND convergence(s2, l2) IMPLIES convergence(s1 + s2, l1 + l2) limit_opposite : PROPOSITION convergence(s1, l1) IMPLIES convergence(-s1, -l1) limit_diff : PROPOSITION convergence(s1, l1) AND convergence(s2, l2) IMPLIES convergence(s1 - s2, l1 - l2) limit_prod : PROPOSITION convergence(s1, l1) AND convergence(s2, l2) IMPLIES convergence(s1 * s2, l1 * l2) limit_const : PROPOSITION convergence(const(a), a) limit_scal : PROPOSITION convergence(s1, l1) IMPLIES convergence(a * s1, a * l1) limit_inv : PROPOSITION convergence(s3, l2) AND l2 /= 0 IMPLIES convergence(1 / s3, 1 / l2) limit_div : PROPOSITION convergence(s1, l1) AND convergence(s3, l2) AND l2 /= 0 IMPLIES convergence(s1 / s3, l1 / l2) limit_abs : PROPOSITION convergence(s1, l1) IMPLIES convergence(abs(s1), abs(l1)) limit_order : PROPOSITION convergence(s1, l1) and convergence(s2, l2) AND (FORALL n : s1(n) <= s2(n)) IMPLIES l1 <= l2 %------------- % Squeezing %------------- squeezing_variant : PROPOSITION convergence(s1, l) and convergence(s2, l) AND (FORALL n : N <= n IMPLIES s1(n) <= s(n) and s(n) <= s2(n)) IMPLIES convergence(s, l) squeezing_const1 : PROPOSITION convergence(s1, l) AND (FORALL n : N <= n IMPLIES l <= s(n) AND s(n) <= s1(n)) IMPLIES convergence(s, l) squeezing_const2 : PROPOSITION convergence(s1, l) AND (FORALL n : N <= n IMPLIES s1(n) <= s(n) AND s(n) <= l) IMPLIES convergence(s, l) squeezing : PROPOSITION convergence(s1, l) and convergence(s2, l) AND (FORALL n : s1(n) <= s(n) and s(n) <= s2(n)) IMPLIES convergence(s, l) abs_convergence : COROLLARY convergence(s, 0) IFF convergence(abs(s), 0) %---------------------------------- % Same properties with convergent %---------------------------------- convergent_sum : PROPOSITION convergent(s1) AND convergent(s2) IMPLIES convergent(s1 + s2) convergent_opposite : PROPOSITION convergent(s1) IMPLIES convergent(-s1) convergent_diff : PROPOSITION convergent(s1) AND convergent(s2) IMPLIES convergent(s1 - s2) convergent_prod : PROPOSITION convergent(s1) AND convergent(s2) IMPLIES convergent(s1 * s2) convergent_const : PROPOSITION convergent(const(a)) convergent_scal : PROPOSITION convergent(s1) IMPLIES convergent(a * s1) convergent_inv : PROPOSITION convergent(s3) AND limit(s3) /= 0 IMPLIES convergent(1 / s3) convergent_div : PROPOSITION convergent(s1) AND convergent(s3) AND limit(s3) /= 0 IMPLIES convergent(s1 / s3) convergent_abs : PROPOSITION convergent(s1) IMPLIES convergent(abs(s1)) %--------------------------------- % Types of convergent sequences %--------------------------------- v1, v2 : VAR (convergent) u : VAR { s3 | convergent(s3) } convergent_nz(u) : bool = limit(u) /= 0 v3 : VAR (convergent_nz) %-------------- % Judgements %-------------- constant_seq1: JUDGEMENT const(a) HAS_TYPE (convergent) constant_seq2: JUDGEMENT const(b: nzreal) HAS_TYPE (convergent_nz) conv_seq_plus: JUDGEMENT +(v1, v2) HAS_TYPE (convergent) conv_seq_minus: JUDGEMENT -(v1, v2) HAS_TYPE (convergent) conv_seq_times: JUDGEMENT *(v1, v2) HAS_TYPE (convergent) conv_seq_scal: JUDGEMENT *(a, v1) HAS_TYPE (convergent) conv_seq_opposite: JUDGEMENT -(v1) HAS_TYPE (convergent) conv_seq_abs: JUDGEMENT abs(v1) HAS_TYPE (convergent) conv_seq_div1: JUDGEMENT /(v1, v3) HAS_TYPE (convergent) conv_seq_div2: JUDGEMENT /(a, v3) HAS_TYPE (convergent) %----------------------------- % Combinations of sequences %----------------------------- lim_sum : PROPOSITION limit(v1 + v2) = limit(v1) + limit(v2) lim_opposite : PROPOSITION limit(- v1) = - limit(v1) lim_diff : PROPOSITION limit(v1 - v2) = limit(v1) - limit(v2) lim_prod : PROPOSITION limit(v1 * v2) = limit(v1) * limit(v2) lim_inv : PROPOSITION limit(1 / v3) = 1 / limit(v3) lim_div : PROPOSITION limit(v1 / v3) = limit(v1) / limit(v3) lim_const : PROPOSITION limit(const(a)) = a lim_scal : PROPOSITION limit(a * v1) = a * limit(v1) lim_abs : PROPOSITION limit(abs(v1)) = abs(limit(v1)) %--------------------------------------------------- % Expansion of convergence (for computing limits) %--------------------------------------------------- limit_equiv : LEMMA convergence(s, l) IFF convergent(s) AND limit(s) = l END convergence_ops \$\$\$convergence_ops.prf (convergence_ops (limit_sum 0 (limit_sum-1 nil 3236954416 3236954428 ("" (expand "convergence") (("" (skosimp*) (("" (inst -1 "epsilon!1/2") (("" (inst -2 "epsilon!1/2") (("" (skolem!) (("" (skolem!) (("" (inst 1 "n!1 + n!2") (("" (skosimp) (("" (inst -1 "i!1") (("" (inst -2 "i!1") (("" (assert) (("" (expand "+") (("" (lemma "sum_abs" ("x" "s1!1(i!1) - l1!1" "y" "s2!1(i!1) - l2!1")) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((+ const-decl "[T -> real]" real_fun_ops nil) (sequence type-eq-decl nil sequences nil) (- const-decl "[real, real -> real]" reals nil) (sum_abs formula-decl nil absolute_value nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (+ const-decl "[real, real -> real]" reals nil) (/ const-decl "[real, nzreal -> real]" reals nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (convergence const-decl "bool" convergence_sequences nil)) 2553 1380 nil nil)) (limit_opposite 0 (limit_opposite-1 nil 3236954416 3236954429 ("" (expand "convergence") (("" (skosimp*) (("" (inst -1 "epsilon!1") (("" (expand "-") (("" (skolem!) (("" (inst? 1) (("" (skosimp) (("" (inst?) (("" (assert) (("" (lemma "neg_abs" ("x" "s1!1(i!1) - l1!1")) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((- const-decl "[T -> real]" real_fun_ops nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (neg_abs formula-decl nil absolute_value nil) (- const-decl "[real, real -> real]" reals nil) (sequence type-eq-decl nil sequences nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (convergence const-decl "bool" convergence_sequences nil)) 606 460 nil nil)) (limit_diff 0 (limit_diff-1 nil 3236954416 3236954430 ("" (skosimp) (("" (rewrite "diff_function") (("" (lemma "limit_sum" ("s1" "s1!1" "s2" "- s2!1" "l1" "l1!1" "l2" "-l2!1")) (("" (assert) (("" (rewrite "limit_opposite") nil nil)) nil)) nil)) nil)) nil) proved ((diff_function formula-decl nil real_fun_ops nil) (sequence type-eq-decl nil sequences nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (limit_opposite formula-decl nil convergence_ops nil) (limit_sum formula-decl nil convergence_ops nil) (- const-decl "[real -> real]" reals nil) (- const-decl "[T -> real]" real_fun_ops nil)) 494 240 nil nil)) (limit_prod 0 (limit_prod-1 nil 3236954416 3236954432 ("" (expand "convergence") (("" (skosimp*) (("" (lemma "prod_epsilon") (("" (inst -1 "epsilon!1" "l1!1" "l2!1") (("" (skolem!) (("" (inst -2 "e1!1") (("" (inst -3 "e2!1") (("" (skolem!) (("" (skolem!) (("" (inst 1 "n!1 + n!2") (("" (skosimp) (("" (inst -2 "i!1") (("" (inst -3 "i!1") (("" (assert) (("" (expand "*" 1 1) (("" (lemma "prod_bound") (("" (inst -1 "e1!1" "e2!1" "s1!1(i!1)" "s2!1(i!1)" "l1!1" "l2!1") (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (+ const-decl "[real, real -> real]" reals nil) (prod_bound formula-decl nil epsilon_lemmas nil) (sequence type-eq-decl nil sequences nil) (* const-decl "[T -> real]" real_fun_ops nil) (prod_epsilon formula-decl nil epsilon_lemmas nil) (convergence const-decl "bool" convergence_sequences nil)) 2544 1560 nil nil)) (limit_const 0 (limit_const-1 nil 3236954416 3236954432 ("" (skolem!) (("" (grind :if-match nil) nil nil)) nil) proved ((convergence const-decl "bool" convergence_sequences nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (const const-decl "[T -> real]" real_fun_ops nil)) 153 110 nil nil)) (limit_scal 0 (limit_scal-1 nil 3236954416 3236954433 ("" (skosimp) (("" (rewrite "scal_function") (("" (rewrite "limit_prod") (("" (rewrite "limit_const") nil nil)) nil)) nil)) nil) proved ((scal_function formula-decl nil real_fun_ops nil) (sequence type-eq-decl nil sequences nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (limit_const formula-decl nil convergence_ops nil) (const const-decl "[T -> real]" real_fun_ops nil) (limit_prod formula-decl nil convergence_ops nil)) 502 220 nil nil)) (limit_inv 0 (limit_inv-1 nil 3236954416 3236954435 ("" (expand "convergence") (("" (skosimp*) (("" (assert) (("" (lemma "inv_epsilon" ("y1" "l2!1" "e" "epsilon!1")) (("" (assert) (("" (skosimp) (("" (inst -3 "e1!1") (("" (skolem!) (("" (inst 2 "n!1") (("" (skosimp) (("" (inst -3 "i!1") (("" (assert) (("" (expand "/") (("" (assert) (("" (lemma "inv_bound") (("" (inst -1 "e1!1" "s3!1(i!1)" "l2!1") (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (inv_epsilon formula-decl nil epsilon_lemmas nil) (sequence type-eq-decl nil sequences nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (inv_bound formula-decl nil epsilon_lemmas nil) (/ const-decl "[T -> real]" real_fun_ops nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (convergence const-decl "bool" convergence_sequences nil)) 1835 1130 nil nil)) (limit_div 0 (limit_div-1 nil 3236954416 3236954435 ("" (skosimp) (("" (assert) (("" (rewrite "div_function") (("" (use "limit_prod" ("l2" "1/l2!1")) (("" (assert) (("" (rewrite "limit_inv") nil nil)) nil)) nil)) nil)) nil)) nil) proved ((/ const-decl "[real, nzreal -> real]" reals nil) (limit_prod formula-decl nil convergence_ops nil) (/ const-decl "[T -> real]" real_fun_ops nil) (limit_inv formula-decl nil convergence_ops nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (sequence type-eq-decl nil sequences nil) (div_function formula-decl nil real_fun_ops nil)) 856 420 nil nil)) (limit_abs 0 (limit_abs-1 nil 3236954416 3236954437 ("" (expand "convergence") (("" (skosimp*) (("" (inst -1 "epsilon!1") (("" (skolem!) (("" (inst 1 "n!1") (("" (skosimp) (("" (inst -1 "i!1") (("" (assert) (("" (expand "abs" 1 2) (("" (expand "abs" 1 1) (("" (lift-if) (("" (lemma "diff_abs" ("x" "s1!1(i!1)" "y" "l1!1")) (("" (lemma "diff_abs" ("x" "l1!1" "y" "s1!1(i!1)")) (("" (rewrite "diff_abs_commute" -1) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (diff_abs formula-decl nil absolute_value nil) (sequence type-eq-decl nil sequences nil) (diff_abs_commute formula-decl nil absolute_value nil) (abs const-decl "[T -> nonneg_real]" real_fun_ops nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (convergence const-decl "bool" convergence_sequences nil)) 1716 840 nil nil)) (limit_order 0 (limit_order-1 nil 3236954416 3236954439 ("" (skosimp) (("" (expand "convergence") (("" (case "l2!1 < l1!1") (("1" (name "eps" "(l1!1 - l2!1) / 2") (("1" (assert) (("1" (inst -3 "eps") (("1" (inst -4 "eps") (("1" (skolem!) (("1" (skolem!) (("1" (inst -3 "n!1+n!2") (("1" (inst -4 "n!1+n!2") (("1" (inst -5 "n!1+n!2") (("1" (assert) (("1" (expand "abs") (("1" (lift-if) (("1" (ground) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (assert) nil nil)) nil)) nil)) nil) proved ((convergence const-decl "bool" convergence_sequences nil) (- const-decl "[real, real -> real]" reals nil) (/ const-decl "[real, nzreal -> real]" reals nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (= const-decl "[T, T -> boolean]" equalities nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (+ const-decl "[real, real -> real]" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (bool nonempty-type-eq-decl nil booleans nil) (< const-decl "bool" reals nil)) 1768 760 nil nil)) (squeezing_variant 0 (squeezing_variant-1 nil 3236954416 3236954440 ("" (expand "convergence") (("" (skosimp*) (("" (inst -1 "epsilon!1") (("" (inst -2 "epsilon!1") (("" (skolem!) (("" (skolem!) (("" (inst 1 "N!1 + n!1 + n!2") (("" (skosimp) (("" (inst -1 "i!1") (("" (inst -2 "i!1") (("" (inst -3 "i!1") (("" (assert) (("" (flatten) (("" (expand "abs") (("" (lift-if) (("" (split 1) (("1" (flatten) (("1" (assert) nil nil)) nil) ("2" (flatten) (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (+ const-decl "[real, real -> real]" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (convergence const-decl "bool" convergence_sequences nil)) 1324 760 nil nil)) (squeezing_const1 0 (squeezing_const1-2 "Fixed a strange behavior of PVS3.0 conversion" 3236955383 3236955529 ("" (skosimp) (("" (auto-rewrite "limit_const" "const") (("" (lemma "squeezing_variant") (("" (inst -1 "N!1" "l!1" "s!1" "l!1" "s1!1") (("" (rewrite "const[nat]" :dir rl) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) proved ((number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (limit_const formula-decl nil convergence_ops nil) (const const-decl "[T -> real]" real_fun_ops nil) (squeezing_variant formula-decl nil convergence_ops nil)) 142034 5970 t shostak) (squeezing_const1-1 nil 3236954416 3236954440 ("" (skosimp) (("" (auto-rewrite "limit_const" "const") (("" (lemma "squeezing_variant") (("" (inst -1 "N!1" "l!1" "s!1" "l!1" "s1!1") (("" (assert) nil nil)) nil)) nil)) nil)) nil) proved ((number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (const const-decl "[T -> real]" real_fun_ops nil) (limit_const formula-decl nil convergence_ops nil) (squeezing_variant formula-decl nil convergence_ops nil)) 251 150 nil nil)) (squeezing_const2 0 (squeezing_const2-2 "Fixed conversion problem" 3236955578 3236955578 ("" (skosimp) (("" (auto-rewrite "limit_const" "const") (("" (lemma "squeezing_variant") (("" (inst -1 "N!1" "l!1" "s!1" "s1!1" "l!1") (("" (rewrite "const" :dir rl) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) proved nil 43555 4530 t shostak) (squeezing_const2-1 nil 3236954416 3236954441 ("" (skosimp) (("" (auto-rewrite "limit_const" "const") (("" (lemma "squeezing_variant") (("" (inst -1 "N!1" "l!1" "s!1" "s1!1" "l!1") (("" (assert) nil nil)) nil)) nil)) nil)) nil) proved ((number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (limit_const formula-decl nil convergence_ops nil) (const const-decl "[T -> real]" real_fun_ops nil) (squeezing_variant formula-decl nil convergence_ops nil)) 334 130 nil nil)) (squeezing 0 (squeezing-1 nil 3236954416 3236954441 ("" (skosimp) (("" (use "squeezing_variant" ("s1" "s1!1" "s2" "s2!1" "s" "s!1" "N" "0")) (("" (assert) nil nil)) nil)) nil) proved ((squeezing_variant formula-decl nil convergence_ops nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil)) 307 210 nil nil)) (abs_convergence 0 (abs_convergence-1 nil 3236954416 3236954442 ("" (skolem!) (("" (prop) (("1" (forward-chain "limit_abs") (("1" (expand "abs" -1 2) (("1" (propax) nil nil)) nil)) nil) ("2" (forward-chain "limit_opposite") (("2" (assert) (("2" (lemma "squeezing" ("s1" "- abs(s!1)" "s2" "abs(s!1)" "s" "s!1" "l" "0")) (("2" (assert) (("2" (skolem!) (("2" (delete -1 -2 2) (("2" (expand "-") (("2" (expand "abs") (("2" (expand "abs") (("2" (lift-if) (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (limit_abs formula-decl nil convergence_ops nil) (squeezing formula-decl nil convergence_ops nil) (- const-decl "[T -> real]" real_fun_ops nil) (abs const-decl "[T -> nonneg_real]" real_fun_ops nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (limit_opposite formula-decl nil convergence_ops nil)) 572 320 nil nil)) (convergent_sum 0 (convergent_sum-1 nil 3236954416 3236954442 ("" (grind :exclude "convergence" :rewrites ("limit_sum") :if-match nil) (("" (inst + "l!1 + l!2") (("" (assert) nil nil)) nil)) nil) proved ((+ const-decl "[real, real -> real]" reals nil) (limit_sum formula-decl nil convergence_ops nil) (boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (convergent const-decl "bool" convergence_sequences nil)) 460 360 nil nil)) (convergent_opposite 0 (convergent_opposite-1 nil 3236954416 3236954443 ("" (lemma "limit_opposite") (("" (auto-rewrite "convergent") (("" (reduce :if-match nil) (("" (reduce) nil nil)) nil)) nil)) nil) proved ((- const-decl "[real -> real]" reals nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (convergent const-decl "bool" convergence_sequences nil) (limit_opposite formula-decl nil convergence_ops nil)) 423 280 nil nil)) (convergent_diff 0 (convergent_diff-1 nil 3236954416 3236954444 ("" (lemma "limit_diff") (("" (grind :exclude "convergence") nil nil)) nil) proved ((- const-decl "[real, real -> real]" reals nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (number nonempty-type-decl nil numbers nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (boolean nonempty-type-decl nil booleans nil) (convergent const-decl "bool" convergence_sequences nil) (limit_diff formula-decl nil convergence_ops nil)) 939 730 nil nil)) (convergent_prod 0 (convergent_prod-1 nil 3236954416 3236954445 ("" (lemma "limit_prod") (("" (grind :exclude "convergence") nil nil)) nil) proved ((* const-decl "[real, real -> real]" reals nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (number nonempty-type-decl nil numbers nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (boolean nonempty-type-decl nil booleans nil) (convergent const-decl "bool" convergence_sequences nil) (limit_prod formula-decl nil convergence_ops nil)) 950 750 nil nil)) (convergent_const 0 (convergent_const-1 nil 3236954416 3236954445 ("" (lemma "limit_const") (("" (grind :exclude "convergence") nil nil)) nil) proved ((boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (convergent const-decl "bool" convergence_sequences nil) (limit_const formula-decl nil convergence_ops nil)) 236 180 nil nil)) (convergent_scal 0 (convergent_scal-1 nil 3236954416 3236954445 ("" (lemma "limit_scal") (("" (grind :exclude "convergence") nil nil)) nil) proved ((boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (* const-decl "[real, real -> real]" reals nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (convergent const-decl "bool" convergence_sequences nil) (limit_scal formula-decl nil convergence_ops nil)) 640 490 nil nil)) (convergent_inv 0 (convergent_inv-1 nil 3236954416 3236954446 ("" (skosimp) (("" (assert) (("" (expand "convergent") (("" (skolem!) (("" (use "limit_inv") (("" (assert) (("" (rewrite "limit_def" -2 :dir rl) (("" (assert) (("" (inst?) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((/ const-decl "[real, nzreal -> real]" reals nil) (limit_def formula-decl nil convergence_sequences nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (sequence type-eq-decl nil sequences nil) (limit_inv formula-decl nil convergence_ops nil) (convergent const-decl "bool" convergence_sequences nil)) 275 170 nil nil)) (convergent_div 0 (convergent_div-1 nil 3236954416 3236954446 ("" (skosimp) (("" (assert) (("" (expand "convergent") (("" (skosimp*) (("" (use "limit_div") (("" (assert) (("" (rewrite "limit_def" -3 :dir rl) (("" (assert) (("" (inst?) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((/ const-decl "[real, nzreal -> real]" reals nil) (limit_def formula-decl nil convergence_sequences nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (limit_div formula-decl nil convergence_ops nil) (convergent const-decl "bool" convergence_sequences nil)) 554 470 nil nil)) (convergent_abs 0 (convergent_abs-1 nil 3236954416 3236954447 ("" (lemma "limit_abs") (("" (auto-rewrite "convergent") (("" (reduce :if-match nil) (("" (reduce) nil nil)) nil)) nil)) nil) proved ((nonneg_real nonempty-type-eq-decl nil real_types nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (convergent const-decl "bool" convergence_sequences nil) (limit_abs formula-decl nil convergence_ops nil)) 361 270 nil nil)) (convergent_nz_TCC1 0 (convergent_nz_TCC1-1 nil 3236954416 3236954447 ("" (subtype-tcc) nil nil) proved nil 34 20 nil nil)) (constant_seq1 0 (constant_seq1-1 nil 3236954416 3236954447 ("" (lemma "convergent_const") (("" (propax) nil nil)) nil) proved ((convergent_const formula-decl nil convergence_ops nil)) 64 0 nil nil)) (constant_seq2 0 (constant_seq2-1 nil 3236954416 3236954447 ("" (skolem!) (("" (use "limit_const") (("" (auto-rewrite "limit_def" "convergent_nz" "const") (("" (assert) (("" (use "unique_limit" ("l2" "0")) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) proved ((limit_const formula-decl nil convergence_ops nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (const const-decl "[T -> real]" real_fun_ops nil) (limit_def formula-decl nil convergence_sequences nil) (convergent_nz const-decl "bool" convergence_ops nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (unique_limit formula-decl nil convergence_sequences nil)) 207 150 nil nil)) (conv_seq_plus 0 (conv_seq_plus-1 nil 3236954416 3236954447 ("" (skolem!) (("" (rewrite "convergent_sum") nil nil)) nil) proved ((convergent_sum formula-decl nil convergence_ops nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil)) 141 60 nil nil)) (conv_seq_minus 0 (conv_seq_minus-1 nil 3236954416 3236954447 ("" (skolem!) (("" (rewrite "convergent_diff") nil nil)) nil) proved ((convergent_diff formula-decl nil convergence_ops nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil)) 136 60 nil nil)) (conv_seq_times 0 (conv_seq_times-1 nil 3236954416 3236954447 ("" (skolem!) (("" (rewrite "convergent_prod") nil nil)) nil) proved ((convergent_prod formula-decl nil convergence_ops nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil)) 131 60 nil nil)) (conv_seq_scal 0 (conv_seq_scal-1 nil 3236954416 3236954448 ("" (skolem!) (("" (rewrite "convergent_scal") nil nil)) nil) proved ((convergent_scal formula-decl nil convergence_ops nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil)) 117 50 nil nil)) (conv_seq_opposite 0 (conv_seq_opposite-1 nil 3236954416 3236954448 ("" (skolem!) (("" (rewrite "convergent_opposite") nil nil)) nil) proved ((convergent_opposite formula-decl nil convergence_ops nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil)) 103 50 nil nil)) (conv_seq_abs 0 (conv_seq_abs-1 nil 3236954416 3236954448 ("" (skolem!) (("" (rewrite "convergent_abs") nil nil)) nil) proved ((convergent_abs formula-decl nil convergence_ops nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil)) 73 40 nil nil)) (conv_seq_div1 0 (conv_seq_div1-1 nil 3236954416 3236954448 ("" (auto-rewrite "convergent_div" "convergent_nz") (("" (skolem-typepred) (("" (assert) nil nil)) nil)) nil) proved ((boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (convergent_nz const-decl "bool" convergence_ops nil) (convergent_div formula-decl nil convergence_ops nil)) 99 70 nil nil)) (conv_seq_div2 0 (conv_seq_div2-1 nil 3236954416 3236954448 ("" (skolem!) (("" (rewrite "scaldiv_function") (("" (assert) nil nil)) nil)) nil) proved ((scaldiv_function formula-decl nil real_fun_ops nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil) (convergent_nz const-decl "bool" convergence_ops nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil)) 100 70 nil nil)) (lim_sum 0 (lim_sum-1 nil 3236954416 3236954448 ("" (auto-rewrite "limit_def" "limit_sum" "limit_lemma") (("" (skolem!) (("" (assert) nil nil)) nil)) nil) proved ((limit_lemma formula-decl nil convergence_sequences nil) (limit_sum formula-decl nil convergence_ops nil) (limit_def formula-decl nil convergence_sequences nil)) 198 170 nil nil)) (lim_opposite 0 (lim_opposite-1 nil 3236954416 3236954448 ("" (auto-rewrite "limit_def" "limit_opposite" "limit_lemma") (("" (skolem!) (("" (assert) nil nil)) nil)) nil) proved ((limit_lemma formula-decl nil convergence_sequences nil) (limit_opposite formula-decl nil convergence_ops nil) (limit_def formula-decl nil convergence_sequences nil)) 99 60 nil nil)) (lim_diff 0 (lim_diff-1 nil 3236954416 3236954448 ("" (auto-rewrite "limit_def" "limit_diff" "limit_lemma") (("" (skolem!) (("" (assert) nil nil)) nil)) nil) proved ((limit_lemma formula-decl nil convergence_sequences nil) (limit_diff formula-decl nil convergence_ops nil) (limit_def formula-decl nil convergence_sequences nil)) 133 100 nil nil)) (lim_prod 0 (lim_prod-1 nil 3236954416 3236954449 ("" (auto-rewrite "limit_def" "limit_prod" "limit_lemma") (("" (skolem!) (("" (assert) nil nil)) nil)) nil) proved ((limit_lemma formula-decl nil convergence_sequences nil) (limit_prod formula-decl nil convergence_ops nil) (limit_def formula-decl nil convergence_sequences nil)) 201 150 nil nil)) (lim_inv_TCC1 0 (lim_inv_TCC1-1 nil 3236954416 3236954449 ("" (auto-rewrite "convergent_nz") (("" (reduce) nil nil)) nil) proved nil 70 20 nil nil)) (lim_inv_TCC2 0 (lim_inv_TCC2-1 nil 3236954416 3236954449 ("" (subtype-tcc) nil nil) proved ((boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (convergent_nz const-decl "bool" convergence_ops nil) (convergence const-decl "bool" convergence_sequences nil) (limit const-decl "real" convergence_sequences nil)) 381 310 nil nil)) (lim_inv 0 (lim_inv-1 nil 3236954416 3236954449 ("" (auto-rewrite "limit_def" "limit_lemma" "convergent_nz") (("" (skolem-typepred) (("" (assert) (("" (rewrite "limit_inv") nil nil)) nil)) nil)) nil) proved ((boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (convergent_nz const-decl "bool" convergence_ops nil) (limit_lemma formula-decl nil convergence_sequences nil) (limit_inv formula-decl nil convergence_ops nil) (limit const-decl "real" convergence_sequences nil) (limit_def formula-decl nil convergence_sequences nil)) 281 170 nil nil)) (lim_div 0 (lim_div-1 nil 3236954416 3236954450 ("" (auto-rewrite "limit_def" "limit_lemma" "convergent_nz") (("" (skolem-typepred) (("" (assert) (("" (rewrite "limit_div") nil nil)) nil)) nil)) nil) proved ((boolean nonempty-type-decl nil booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (number nonempty-type-decl nil numbers nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (convergent_nz const-decl "bool" convergence_ops nil) (limit_lemma formula-decl nil convergence_sequences nil) (limit_div formula-decl nil convergence_ops nil) (limit const-decl "real" convergence_sequences nil) (limit_def formula-decl nil convergence_sequences nil)) 311 220 nil nil)) (lim_const 0 (lim_const-1 nil 3236954416 3236954450 ("" (skolem!) (("" (rewrite "limit_def") (("" (rewrite "limit_const") nil nil)) nil)) nil) proved ((limit_def formula-decl nil convergence_sequences nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (convergent const-decl "bool" convergence_sequences nil) (const const-decl "[T -> real]" real_fun_ops nil) (limit_const formula-decl nil convergence_ops nil)) 105 70 nil nil)) (lim_scal 0 (lim_scal-1 nil 3236954416 3236954450 ("" (auto-rewrite "limit_def" "limit_scal" "limit_lemma") (("" (skolem!) (("" (assert) nil nil)) nil)) nil) proved ((limit_lemma formula-decl nil convergence_sequences nil) (limit_scal formula-decl nil convergence_ops nil) (limit_def formula-decl nil convergence_sequences nil)) 222 150 nil nil)) (lim_abs 0 (lim_abs-1 nil 3236954416 3236954450 ("" (auto-rewrite "limit_def" "limit_lemma" "limit_abs") (("" (skolem!) (("" (assert) nil nil)) nil)) nil) proved ((limit_lemma formula-decl nil convergence_sequences nil) (limit_abs formula-decl nil convergence_ops nil) (limit_def formula-decl nil convergence_sequences nil)) 60 60 nil nil)) (limit_equiv 0 (limit_equiv-1 nil 3236954416 3236954450 ("" (skolem!) (("" (ground) (("1" (grind :exclude ("convergence")) nil nil) ("2" (rewrite "limit_def") (("2" (expand "convergent") (("2" (inst?) nil nil)) nil)) nil) ("3" (rewrite "limit_def") nil nil)) nil)) nil) proved ((convergent const-decl "bool" convergence_sequences nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (limit_def formula-decl nil convergence_sequences nil)) 338 220 nil nil))) \$\$\$top_sequences.pvs top_sequences : THEORY BEGIN IMPORTING convergence_ops, convergence_sequences END top_sequences \$\$\$continuity_props.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Properties of continuous functions % % in relation with sequences, limits % % and points of accumulation % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% continuity_props[T : TYPE FROM real] : THEORY BEGIN IMPORTING continuous_functions, top_sequences f : VAR [T -> real] u : VAR sequence[T] l, a : VAR T %-------------------------------------------- % u is convergent to l and f is continuous %-------------------------------------------- continuity_limit : PROPOSITION convergence(u, l) AND continuous(f, l) IMPLIES convergence(f o u, f(l)) %-------------------------------------------- % point of accumulation %-------------------------------------------- continuity_accumulation : PROPOSITION accumulation(u, a) AND continuous(f, a) IMPLIES accumulation(f o u, f(a)) END continuity_props \$\$\$continuity_props.prf (|continuity_props| (|continuity_limit| "" (GRIND :EXCLUDE ("abs" "continuous") :REWRITES ("continuity_def[T]") :IF-MATCH NIL) (("" (INST -5 "epsilon!1") (("" (SKOLEM!) (("" (INST -4 "delta!1") (("" (SKOLEM!) (("" (INST 1 "n!1") (("" (SKOSIMP) (("" (INST?) (("" (INST?) (("" (ASSERT) NIL))))))))))))))))))) (|continuity_accumulation| "" (GRIND :EXCLUDE ("abs" "continuous") :REWRITES ("continuity_def[T]") :IF-MATCH NIL) (("" (INST -6 "epsilon!1") (("" (SKOLEM!) (("" (INST -5 "delta!1" "n!1") (("" (SKOSIMP) (("" (INST -7 "u!1(i!1)") (("" (INST?) (("" (ASSERT) NIL)))))))))))))))) \$\$\$continuity_interval.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % continuous functions on a closed interval % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% continuity_interval [ a : real, b : {x : real | a <= x }] : THEORY BEGIN %----------------------------- % Interval [a, b] as a type %----------------------------- x : VAR real J : NONEMPTY_TYPE = { x | a <= x AND x <= b} f : VAR [J -> real] u : VAR sequence[J] c : VAR J n, i : VAR nat IMPORTING continuity_props %----------------------------------------------- % Reformulation of Bolzano/Weirstrass theorem %----------------------------------------------- bolz_weier : PROPOSITION EXISTS c : accumulation(u, c) %------------------------------------- % If f is continuous, it is bounded %------------------------------------- unbounded_sequence : LEMMA bounded_above?(f) or EXISTS u : FORALL n : f(u(n)) > n bounded_from_above : PROPOSITION continuous(f) IMPLIES bounded_above?(f) bounded_from_below : PROPOSITION continuous(f) IMPLIES bounded_below?(f) %-------------------------------------- % f has a maximum and a minimum in J %-------------------------------------- max_extraction : LEMMA continuous(f) IMPLIES EXISTS u : FORALL n : sup(f) - f(u(n)) < 1/(n+1) sup_is_reached : PROPOSITION continuous(f) IMPLIES EXISTS c : f(c) = sup(f) maximum_exists : PROPOSITION continuous(f) IMPLIES EXISTS c : is_maximum(c, f) inf_is_reached : PROPOSITION continuous(f) IMPLIES EXISTS c : f(c) = inf(f) minimum_exists : PROPOSITION continuous(f) IMPLIES EXISTS c : is_minimum(c, f) %------------------------------- % Intermediate value theorem %------------------------------- intermediate_value1 : PROPOSITION continuous(f) AND f(a) < x AND x < f(b) IMPLIES EXISTS c : f(c) = x intermediate_value2 : PROPOSITION continuous(f) AND f(a) <= x AND x <= f(b) IMPLIES EXISTS c : f(c) = x intermediate_value3 : PROPOSITION continuous(f) AND f(b) < x AND x < f(a) IMPLIES EXISTS c : f(c) = x intermediate_value4 : PROPOSITION continuous(f) AND f(b) <= x AND x <= f(a) IMPLIES EXISTS c : f(c) = x END continuity_interval \$\$\$continuity_interval.prf (continuity_interval (J_TCC1 0 (J_TCC1-1 nil 3237208616 3237208862 ("" (inst 1 "a") (("" (assert) nil nil)) nil) proved ((b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil)) 25 30 nil nil)) (bolz_weier 0 (bolz_weier-1 nil 3237208616 3237212834 ("" (skolem!) (("" (lemma "bolzano_weierstrass4") (("" (inst - "a" "b" "u!1") (("" (apply (then (reduce :if-match nil) (reduce))) nil nil)) nil)) nil)) nil) proved ((bolzano_weierstrass4 formula-decl nil convergence_sequences nil) (NOT const-decl "[bool -> bool]" booleans nil) (J nonempty-type-eq-decl nil continuity_interval nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (<= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (a formal-const-decl "real" continuity_interval nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil)) 57713 5560 t nil)) (unbounded_sequence 0 (unbounded_sequence-1 nil 3237208616 3237210736 ("" (skosimp) (("" (expand "bounded_above?") (("" (inst 2 "lambda (n : nat) : epsilon! (x : J) : f!1(x) > n") (("" (skosimp) (("" (use "epsilon_ax[J]") (("" (ground) (("" (inst? 2) (("" (delete 3) (("" (skolem!) (("" (inst?) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((bounded_above? const-decl "bool" real_fun_props nil) (epsilon_ax formula-decl nil epsilons nil) (> const-decl "bool" reals nil) (epsilon const-decl "T" epsilons nil) (pred type-eq-decl nil defined_types nil) (sequence type-eq-decl nil sequences nil) (J nonempty-type-eq-decl nil continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil)) 74227 15410 t nil)) (bounded_from_above 0 (bounded_from_above-1 nil 3237208616 3237210902 ("" (skosimp) (("" (use "unbounded_sequence") (("" (assert) (("" (skolem!) (("" (use "bolz_weier") (("" (skolem!) (("" (expand "continuous") (("" (inst? -3) (("" (forward-chain "continuity_accumulation[J]") (("" (delete -2 -4 1) (("" (expand* "accumulation" "o") (("" (case "EXISTS (m : nat) : f!1(c!1) + 1 < m") (("1" (skolem!) (("1" (inst -2 "1" "m!1") (("1" (skosimp) (("1" (inst?) (("1" (expand "abs") (("1" (smash) nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -) (("2" (use "axiom_of_archimedes") (("2" (skolem!) (("2" (inst + "max(0, i!1)") (("1" (assert) nil nil) ("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((unbounded_sequence formula-decl nil continuity_interval nil) (J nonempty-type-eq-decl nil continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (< const-decl "bool" reals nil) (+ const-decl "[real, real -> real]" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (axiom_of_archimedes formula-decl nil real_props nil) (max const-decl "{p: real | p >= m AND p >= n}" real_defs nil) (i!1 skolem-const-decl "int" continuity_interval nil) (accumulation const-decl "bool" convergence_sequences nil) (O const-decl "T3" function_props nil) (continuity_accumulation formula-decl nil continuity_props nil) (continuous const-decl "bool" continuous_functions nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (bolz_weier formula-decl nil continuity_interval nil)) 161101 19820 t nil)) (bounded_from_below 0 (bounded_from_below-1 nil 3237208616 3237210921 ("" (skosimp) (("" (lemma "bounded_from_above" ("f" "-f!1")) (("" (rewrite "bounded_above_opposite[J]") (("" (assert) (("" (rewrite "opp_fun_continuous[J]") nil nil)) nil)) nil)) nil)) nil) proved ((- const-decl "[T -> real]" real_fun_ops nil) (J nonempty-type-eq-decl nil continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (bounded_from_above formula-decl nil continuity_interval nil) (continuous_fun nonempty-type-eq-decl nil continuous_functions nil) (continuous const-decl "bool" continuous_functions nil) (opp_fun_continuous subtype-tcc nil continuous_functions nil) (bounded_above_opposite formula-decl nil real_fun_props nil)) 6868 4110 t nil)) (max_extraction_TCC1 0 (max_extraction_TCC1-1 nil 3237208616 3237208865 ("" (lemma "bounded_from_above") (("" (propax) nil nil)) nil) proved ((bounded_from_above formula-decl nil continuity_interval nil)) 13 10 nil nil)) (max_extraction 0 (max_extraction-1 nil 3237208616 3237211033 ("" (skosimp) (("" (forward-chain "bounded_from_above") (("" (assert) (("" (inst + "LAMBDA (n : nat) : epsilon! (x : J) : sup(f!1) - f!1(x) < 1 / (1 + n)") (("" (skolem!) (("" (use "epsilon_ax[J]") (("" (ground) (("" (delete 2) (("" (lemma "supfun_is_sup[J]" ("g" "f!1" "epsilon" "1/(1+n!1)")) (("" (skolem!) (("" (inst?) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((bounded_from_above formula-decl nil continuity_interval nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (bool nonempty-type-eq-decl nil booleans nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (<= const-decl "bool" reals nil) (a formal-const-decl "real" continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (J nonempty-type-eq-decl nil continuity_interval nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (rational nonempty-type-from-decl nil rationals nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (int nonempty-type-eq-decl nil integers nil) (>= const-decl "bool" reals nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (sequence type-eq-decl nil sequences nil) (pred type-eq-decl nil defined_types nil) (epsilon const-decl "T" epsilons nil) (< const-decl "bool" reals nil) (- const-decl "[real, real -> real]" reals nil) (bounded_above? const-decl "bool" real_fun_props nil) (sup const-decl "real" real_fun_supinf nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (/ const-decl "[real, nzreal -> real]" reals nil) (+ const-decl "[real, real -> real]" reals nil) (epsilon_ax formula-decl nil epsilons nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (supfun_is_sup formula-decl nil real_fun_supinf nil)) 99964 10960 t nil)) (sup_is_reached 0 (sup_is_reached-1 nil 3237208616 3237211605 ("" (skosimp) (("" (forward-chain "bounded_from_above") (("" (forward-chain "max_extraction") (("" (assert) (("" (skolem!) (("" (use "bolz_weier") (("" (skolem!) (("" (expand "continuous") (("" (inst? -4) (("" (forward-chain "continuity_accumulation[J]") (("" (delete -2 -4 -5) (("" (inst? +) (("" (expand* "accumulation" "o") (("" (use "supfun_is_bound[J]") (("" (name "eps" "sup(f!1) - f!1(c!1)") (("" (assert) (("" (use "archimedean2" ("x" "eps/2")) (("" (skolem!) (("" (inst - "eps/2" "a!1") (("" (skosimp) (("" (inst - "i!1") (("" (use "both_sides_div_pos_lt2" ("pz" "1" "px" "1+i!1" "py" "a!1")) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((bounded_from_above formula-decl nil continuity_interval nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (bool nonempty-type-eq-decl nil booleans nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (<= const-decl "bool" reals nil) (a formal-const-decl "real" continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (J nonempty-type-eq-decl nil continuity_interval nil) (bolz_weier formula-decl nil continuity_interval nil) (sequence type-eq-decl nil sequences nil) (nat nonempty-type-eq-decl nil naturalnumbers nil) (>= const-decl "bool" reals nil) (int nonempty-type-eq-decl nil integers nil) (integer_pred const-decl "[rational -> boolean]" integers nil) (rational nonempty-type-from-decl nil rationals nil) (rational_pred const-decl "[real -> boolean]" rationals nil) (continuous const-decl "bool" continuous_functions nil) (continuity_accumulation formula-decl nil continuity_props nil) (supfun_is_bound formula-decl nil real_fun_supinf nil) (bounded_above? const-decl "bool" real_fun_props nil) (+ const-decl "[real, real -> real]" reals nil) (both_sides_div_pos_lt2 formula-decl nil real_props nil) (nonneg_int nonempty-type-eq-decl nil integers nil) (posnat nonempty-type-eq-decl nil integers nil) (archimedean2 formula-decl nil real_facts nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (/ const-decl "[real, nzreal -> real]" reals nil) (sup const-decl "real" real_fun_supinf nil) (- const-decl "[real, real -> real]" reals nil) (= const-decl "[T, T -> boolean]" equalities nil) (accumulation const-decl "bool" convergence_sequences nil) (O const-decl "T3" function_props nil) (max_extraction formula-decl nil continuity_interval nil)) 142914 21090 t nil)) (maximum_exists 0 (maximum_exists-1 nil 3237208616 3237211618 ("" (skosimp) (("" (forward-chain "sup_is_reached") (("" (skolem!) (("" (inst?) (("" (rewrite "max_upper_bound[J]") (("" (assert) (("" (rewrite "bounded_from_above") nil nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((sup_is_reached formula-decl nil continuity_interval nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (bool nonempty-type-eq-decl nil booleans nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (<= const-decl "bool" reals nil) (a formal-const-decl "real" continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (J nonempty-type-eq-decl nil continuity_interval nil) (bounded_from_above formula-decl nil continuity_interval nil) (max_upper_bound formula-decl nil real_fun_supinf nil)) 7405 5790 t nil)) (inf_is_reached_TCC1 0 (inf_is_reached_TCC1-1 nil 3237208616 3237208869 ("" (lemma "bounded_from_below") (("" (propax) nil nil)) nil) proved ((bounded_from_below formula-decl nil continuity_interval nil)) 14 10 nil nil)) (inf_is_reached 0 (inf_is_reached-1 nil 3237208616 3237211796 ("" (skosimp) (("" (use "sup_is_reached" ("f" "-f!1")) (("" (auto-rewrite "opp_fun_continuous[J]" "supfun_opposite[J]" "-" "bounded_from_below") (("" (reduce :if-match nil) (("" (inst?) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) proved ((sup_is_reached formula-decl nil continuity_interval nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (bool nonempty-type-eq-decl nil booleans nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (<= const-decl "bool" reals nil) (a formal-const-decl "real" continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (J nonempty-type-eq-decl nil continuity_interval nil) (- const-decl "[T -> real]" real_fun_ops nil) (opp_fun_continuous subtype-tcc nil continuous_functions nil) (bounded_from_below formula-decl nil continuity_interval nil) (supfun_opposite formula-decl nil real_fun_supinf nil) (NOT const-decl "[bool -> bool]" booleans nil)) 65223 7230 t nil)) (minimum_exists 0 (minimum_exists-1 nil 3237208616 3237211862 ("" (auto-rewrite "max_opposite[J]" "opp_fun_continuous[J]") (("" (skosimp) (("" (use "maximum_exists" ("f" "-f!1")) (("" (reduce) nil nil)) nil)) nil)) nil) proved ((opp_fun_continuous subtype-tcc nil continuous_functions nil) (max_opposite formula-decl nil real_fun_props nil) (- const-decl "[T -> real]" real_fun_ops nil) (J nonempty-type-eq-decl nil continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (maximum_exists formula-decl nil continuity_interval nil)) 52671 4160 t nil)) (intermediate_value1_TCC1 0 (intermediate_value1_TCC1-1 nil 3237208616 3237208870 ("" (skosimp) (("" (assert) (("" (assert) nil nil)) nil)) nil) proved nil 34 30 nil nil)) (intermediate_value1_TCC2 0 (intermediate_value1_TCC2-1 nil 3237208616 3237208870 ("" (skosimp) (("" (assert) nil nil)) nil) proved nil 41 40 nil nil)) (intermediate_value1 0 (intermediate_value1-1 nil 3237208616 3237212591 ("" (skosimp) (("" (name "E" "{y:real| a <= y AND y <= b AND f!1(y) < x!1}") (("1" (case "nonempty?(E) AND bounded_above?(E)") (("1" (ground) (("1" (case "a <= lub(E) AND lub(E) <= b") (("1" (ground) (("1" (delete -1 -2 -3 -4) (("1" (expand "continuous") (("1" (inst - "lub(E)") (("1" (inst + "lub(E)") (("1" (auto-rewrite "abs" "subset_fullset[real]") (("1" (case "x!1 < f!1(lub(E))") (("1" (assert) (("1" (rewrite "continuity_def[J]") (("1" (inst - "f!1(lub(E)) - x!1") (("1" (skolem!) (("1" (use "adherence_sup" ("epsilon" "delta!1")) (("1" (skolem-typepred) (("1" (replace -4 -1 rl) (("1" (assert) (("1" (use "lub_is_bound" ("U" "E" "x" "x!2")) (("1" (ground) (("1" (inst - "x!2") (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (name "F" "{y:real | lub(E) < y AND y <= b}") (("2" (expand* "continuous" "convergence") (("2" (use "subset_convergence2[J]" ("E1" "F")) (("1" (ground) (("1" (delete -4) (("1" (use "convergence_lower_bound[J]" ("b" "x!1")) (("1" (assert) (("1" (skosimp) (("1" (replace -3 -1 rl) (("1" (assert) (("1" (use "lub_is_bound" ("U" "E" "x" "x!2")) (("1" (assert) nil nil) ("2" (replace -4 1 rl) (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (replace -1 + rl) (("2" (expand "adh") (("2" (skosimp) (("2" (case "b < lub(E) + e!1") (("1" (assert) (("1" (inst + "b") (("1" (assert) nil nil)) nil)) nil) ("2" (assert) (("2" (inst + "lub(E) + e!1/2") (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -1 -2 -4 -5 -6 2) (("2" (ground) (("1" (rewrite "lub_is_bound") (("1" (replace -1 + rl) (("1" (assert) nil nil)) nil)) nil) ("2" (rewrite "lub_is_lub") (("2" (skolem-typepred) (("2" (replace -2 - rl) (("2" (assert) (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (replace -1 + rl) (("2" (delete -1 -2 2) (("2" (grind :if-match nil) (("1" (inst + "b") (("1" (reduce) nil nil)) nil) ("2" (inst - "a") (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (skosimp) (("2" (assert) nil nil)) nil)) nil)) nil) proved ((J nonempty-type-eq-decl nil continuity_interval nil) (< const-decl "bool" reals nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (= const-decl "[T, T -> boolean]" equalities nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (IMPLIES const-decl "[bool, bool -> bool]" booleans nil) (empty? const-decl "bool" sets nil) (member const-decl "bool" sets nil) (upper_bound? const-decl "bool" bounded_real_defs nil) (lub_is_lub formula-decl nil real_facts nil) (continuous const-decl "bool" continuous_functions nil) (continuity_def formula-decl nil continuous_functions nil) (NOT const-decl "[bool -> bool]" booleans nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (lub_is_bound formula-decl nil real_facts nil) (adherence_sup formula-decl nil real_facts nil) (- const-decl "[real, real -> real]" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (convergence const-decl "bool" limit_of_functions nil) (continuous const-decl "bool" continuous_functions nil) (/ const-decl "[real, nzreal -> real]" reals nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (+ const-decl "[real, real -> real]" reals nil) (subset_fullset formula-decl nil sets_lemmas nil) (convergence_lower_bound formula-decl nil convergence_functions nil) (adh const-decl "setof[real]" convergence_functions nil) (F skolem-const-decl "[real -> boolean]" continuity_interval nil) (E skolem-const-decl "[real -> boolean]" continuity_interval nil) (fullset const-decl "set" sets nil) (subset_convergence2 formula-decl nil convergence_functions nil) (setof type-eq-decl nil defined_types nil) (lub const-decl "{x | least_upper_bound?(x, SA)}" bounded_real_defs nil) (least_upper_bound? const-decl "bool" bounded_real_defs nil) (bounded_above? const-decl "bool" bounded_real_defs nil) (nonempty? const-decl "bool" sets nil) (set type-eq-decl nil sets nil)) 404770 64290 t nil)) (intermediate_value2_TCC1 0 (intermediate_value2_TCC1-1 nil 3237208616 3237208876 ("" (skosimp) (("" (assert) nil nil)) nil) proved nil 235 40 nil nil)) (intermediate_value2 0 (intermediate_value2-1 nil 3237208616 3237212649 ("" (skosimp) (("" (use "intermediate_value1") (("" (reduce) nil nil)) nil)) nil) proved ((intermediate_value1 formula-decl nil continuity_interval nil) (J nonempty-type-eq-decl nil continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil)) 22704 2700 t nil)) (intermediate_value3_TCC1 0 (intermediate_value3_TCC1-1 nil 3237208616 3237208877 ("" (skosimp) (("" (assert) nil nil)) nil) proved nil 27 30 nil nil)) (intermediate_value3 0 (intermediate_value3-1 nil 3237208616 3237212700 ("" (skosimp) (("" (lemma "intermediate_value1" ("f" "-f!1" "x" "-x!1")) (("" (auto-rewrite "opp_fun_continuous[J]" "-") (("" (assert) (("" (skolem!) (("" (inst?) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((- const-decl "[real -> real]" reals nil) (- const-decl "[T -> real]" real_fun_ops nil) (J nonempty-type-eq-decl nil continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (intermediate_value1 formula-decl nil continuity_interval nil) (opp_fun_continuous subtype-tcc nil continuous_functions nil)) 35008 9440 t nil)) (intermediate_value4 0 (intermediate_value4-1 nil 3237208616 3237212745 ("" (skosimp) (("" (use "intermediate_value3") (("" (reduce) nil nil)) nil)) nil) proved ((intermediate_value3 formula-decl nil continuity_interval nil) (J nonempty-type-eq-decl nil continuity_interval nil) (b formal-const-decl "{x: real | a <= x}" continuity_interval nil) (a formal-const-decl "real" continuity_interval nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil)) 40317 6770 t nil))) \$\$\$continuous_functions_props.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % More properties of continuous functions [T1 -> T2] % % Applications of continuity_interval % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% continuous_functions_props[ T : TYPE FROM real] : THEORY BEGIN ASSUMING connected_domain : ASSUMPTION FORALL (x, y : T), (z : real) : x <= z AND z <= y IMPLIES T_pred(z) ENDASSUMING IMPORTING continuity_interval f : VAR [T -> real] a, b, c, d : VAR T sub_interval : LEMMA FORALL (c : T), (d : {x : T | c <= x}), (u : J[c, d]) : T_pred(u) %---------------------------------------- % Restriction to a sub-interval of T1 %---------------------------------------- R(f, (c : T), (d : {x : T | c <= x})) : [J[c,d] -> real] = LAMBDA (u : J[c, d]) : f(u) %----------------------------------------------------- % If f is continuous, its restriction is continuous %----------------------------------------------------- g : VAR { f | continuous(f) } continuous_in_subintervals : LEMMA a <= b IMPLIES continuous(R(g, a, b)) %------------------------------ % Intermediate value theorem %------------------------------ x, y, z : VAR real intermediate1 : PROPOSITION a <= b AND g(a) <= x AND x <= g(b) IMPLIES EXISTS c : a <= c AND c <= b AND g(c) = x intermediate2 : PROPOSITION a <= b AND g(b) <= x AND x <= g(a) IMPLIES EXISTS c : a <= c AND c <= b AND g(c) = x %---------------------------------- % Max and minimum in an interval %---------------------------------- max_in_interval : PROPOSITION a <= b IMPLIES EXISTS c : a <= c AND c <= b AND (FORALL d : a <= d AND d <= b IMPLIES g(d) <= g(c)) min_in_interval : PROPOSITION a <= b IMPLIES EXISTS c : a <= c AND c <= b AND (FORALL d : a <= d AND d <= b IMPLIES g(c) <= g(d)) %--------------------------------------------------------- % Injective, continuous functions are strictly monotone %--------------------------------------------------------- inj_continuous : LEMMA injective?(g) AND a <= b AND b <= c IMPLIES (g(a) <= g(b) AND g(b) <= g(c)) OR (g(c) <= g(b) AND g(b) <= g(a)) inj_monotone : PROPOSITION injective?(g) IFF strict_increasing(g) OR strict_decreasing(g) END continuous_functions_props \$\$\$continuous_functions_props.prf (|continuous_functions_props| (|sub_interval_TCC1| "" (SKOSIMP) (("" (ASSERT) NIL))) (|sub_interval| "" (SKOLEM!) (("" (LEMMA "connected_domain" ("x" "c!1" "y" "d!1" "z" "u!1")) (("" (ASSERT) NIL))))) (R_TCC1 "" (SKOLEM-TYPEPRED) (("" (USE "connected_domain" ("z" "u!1")) (("" (ASSERT) NIL))))) (|continuous_in_subintervals| "" (SKOSIMP :PREDS? T) (("" (AUTO-REWRITE "sub_interval") (("" (EXPAND "continuous") (("" (SKOLEM!) (("" (INST -3 "x0!1") (("" (REWRITE "continuity_def[J[a!1,b!1]]") (("" (REWRITE "continuity_def[T]") (("" (SKOLEM!) (("" (INST -3 "epsilon!1") (("" (SKOLEM!) (("" (INST 1 "delta!1") (("" (SKOSIMP) (("" (INST -3 "x!1") (("" (EXPAND "R") (("" (ASSERT) NIL))))))))))))))))))))))))))))) (|intermediate1| "" (SKOSIMP) (("" (ASSERT) (("" (AUTO-REWRITE "sub_interval") (("" (LEMMA "intermediate_value2[a!1, b!1]") (("" (INST -1 "R(g!1, a!1, b!1)" "x!1") (("" (REWRITE "continuous_in_subintervals") (("" (EXPAND "R") (("" (SKOLEM!) (("" (INST 1 "c!1") (("" (ASSERT) NIL))))))))))))))))))) (|intermediate2| "" (SKOSIMP) (("" (ASSERT) (("" (AUTO-REWRITE "sub_interval") (("" (LEMMA "intermediate_value4[a!1, b!1]") (("" (INST -1 "R(g!1, a!1, b!1)" "x!1") (("" (REWRITE "continuous_in_subintervals") (("" (EXPAND "R") (("" (SKOLEM!) (("" (INST 1 "c!1") (("" (ASSERT) NIL))))))))))))))))))) (|max_in_interval| "" (SKOSIMP) (("" (ASSERT) (("" (AUTO-REWRITE "sub_interval") (("" (LEMMA "maximum_exists[a!1, b!1]") (("" (INST -1 "R(g!1, a!1, b!1)") (("" (SPLIT) (("1" (GRIND :IF-MATCH NIL) (("1" (INST 1 "c!1") (("1" (ASSERT) (("1" (SKOSIMP) (("1" (INST?) (("1" (ASSERT) NIL))))))))))) ("2" (REWRITE "continuous_in_subintervals") NIL))))))))))))) (|min_in_interval| "" (SKOSIMP) (("" (ASSERT) (("" (AUTO-REWRITE "sub_interval") (("" (LEMMA "minimum_exists[a!1, b!1]") (("" (INST -1 "R(g!1, a!1, b!1)") (("" (SPLIT) (("1" (GRIND :IF-MATCH NIL) (("1" (INST 1 "c!1") (("1" (ASSERT) (("1" (SKOSIMP) (("1" (INST?) (("1" (ASSERT) NIL))))))))))) ("2" (REWRITE "continuous_in_subintervals") NIL))))))))))))) (|inj_continuous| "" (SKOSIMP) (("" (EXPAND "injective?") (("" (ASSERT) (("" (CASE "g!1(a!1) <= g!1(c!1)") (("1" (GROUND) (("1" (LEMMA "intermediate1" ("g" "g!1" "a" "b!1" "b" "c!1" "x" "g!1(a!1)")) (("1" (ASSERT) (("1" (SKOSIMP) (("1" (INST -5 "a!1" "c!2") (("1" (ASSERT) NIL))))))))) ("2" (LEMMA "intermediate1" ("g" "g!1" "a" "a!1" "b" "b!1" "x" "g!1(c!1)")) (("2" (ASSERT) (("2" (SKOSIMP) (("2" (INST -5 "c!1" "c!2") (("2" (ASSERT) NIL))))))))))) ("2" (GROUND) (("1" (LEMMA "intermediate2" ("g" "g!1" "a" "a!1" "b" "b!1" "x" "g!1(c!1)")) (("1" (ASSERT) (("1" (SKOSIMP) (("1" (INST -4 "c!1" "c!2") (("1" (ASSERT) NIL))))))))) ("2" (LEMMA "intermediate2" ("g" "g!1" "a" "b!1" "b" "c!1" "x" "g!1(a!1)")) (("2" (ASSERT) (("2" (SKOSIMP) (("2" (INST -4 "c!2" "a!1") (("2" (ASSERT) NIL))))))))))))))))))) (|inj_monotone| "" (SKOLEM!) (("" (PROP) (("1" (EXPAND "strict_increasing") (("1" (EXPAND "strict_decreasing") (("1" (SKOSIMP*) (("1" (ASSERT) (("1" (EXPAND "injective?") (("1" (INST-CP -1 "x!1" "y!1") (("1" (INST -1 "x!2" "y!2") (("1" (ASSERT) (("1" (CASE "x!1 <= x!2") (("1" (LEMMA "inj_continuous" ("g" "g!1" "a" "x!1" "b" "x!2" "c" "y!2")) (("1" (ASSERT) (("1" (LEMMA "inj_continuous" ("g" "g!1" "a" "x!1" "b" "y!1" "c" "y!2")) (("1" (LEMMA "inj_continuous" ("g" "g!1" "a" "x!1" "b" "y!2" "c" "y!1")) (("1" (ASSERT) NIL))))))))) ("2" (LEMMA "inj_continuous" ("g" "g!1" "a" "x!2" "b" "x!1" "c" "y!1")) (("2" (ASSERT) (("2" (LEMMA "inj_continuous" ("g" "g!1" "a" "x!2" "b" "y!2" "c" "y!1")) (("2" (LEMMA "inj_continuous" ("g" "g!1" "a" "x!2" "b" "y!1" "c" "y!2")) (("2" (ASSERT) NIL))))))))))))))))))))))))))) ("2" (GRIND :IF-MATCH NIL) (("2" (INST-CP -3 "x1!1" "x2!1") (("2" (INST -3 "x2!1" "x1!1") (("2" (ASSERT) NIL))))))) ("3" (GRIND :IF-MATCH NIL) (("3" (INST-CP -3 "x1!1" "x2!1") (("3" (INST -3 "x2!1" "x1!1") (("3" (ASSERT) NIL)))))))))))) \$\$\$derivative_props.pvs derivative_props [ T : TYPE FROM real ] : THEORY BEGIN ASSUMING connected_domain : ASSUMPTION FORALL (x, y : T), (z : real) : x <= z AND z <= y IMPLIES T_pred(z) not_one_element : ASSUMPTION FORALL (x : T) : EXISTS (y : T) : x /= y ENDASSUMING IMPORTING derivatives, continuous_functions_props f : VAR [T -> real] x, y, a, b, c : VAR T D : VAR real %-------------------------------------------- % Equivalent definitions of differentiation %-------------------------------------------- derivative_equivalence1 : LEMMA (derivable(f, x) AND deriv(f, x) = D) IFF convergence(NQ(f, x), 0, D) derivative_equivalence2 : LEMMA convergence(NQ(f, x), 0, D) IFF (EXISTS (phi : [T -> real]) : convergence(phi, x, 0) AND FORALL y : f(y) - f(x) = (y - x) * (D + phi(y))) %-------------------------------------- % Derivative at max and minimum of f % (in an interval ]a, b[) %-------------------------------------- deriv_maximum : PROPOSITION a < c AND c < b AND derivable(f, c) AND (FORALL x : a < x AND x < b IMPLIES f(x) <= f(c)) IMPLIES deriv(f, c) = 0 deriv_minimum : PROPOSITION a < c AND c < b AND derivable(f, c) AND (FORALL x : a < x AND x < b IMPLIES f(c) <= f(x)) IMPLIES deriv(f, c) = 0 %------------------------------------ % f constant on [a, b] %------------------------------------ deriv_constant1 : LEMMA a < c AND c < b AND (FORALL x : a < x AND x < b IMPLIES f(x) = f(c)) IMPLIES convergence(NQ(f, c), 0, 0) deriv_constant2 : LEMMA a < c AND c < b AND (FORALL x : a < x AND x < b IMPLIES f(x) = f(c)) IMPLIES derivable(f, c) AND deriv(f, c) = 0 %----------------------- % Mean value theorem %----------------------- mean_value_aux : LEMMA derivable(f) AND a < b AND f(a) = f(b) IMPLIES EXISTS c : a < c AND c < b AND deriv(f, c) = 0 mean_value : THEOREM derivable(f) AND a < b IMPLIES EXISTS c : a < c AND c < b AND deriv(f, c) * (b - a) = f(b) - f(a) %------------------------------------------ % Applications of the mean value theorem %------------------------------------------ g : VAR deriv_fun[T] nonneg_derivative : PROPOSITION increasing(g) IFF (FORALL x : deriv(g, x) >= 0) nonpos_derivative : PROPOSITION decreasing(g) IFF (FORALL x : deriv(g, x) <= 0) positive_derivative : PROPOSITION (FORALL x : deriv(g, x) > 0) IMPLIES strict_increasing(g) negative_derivative : PROPOSITION (FORALL x : deriv(g, x) < 0) IMPLIES strict_decreasing(g) null_derivative : PROPOSITION constant(g) IFF (FORALL x : deriv(g, x) = 0) END derivative_props \$\$\$derivative_props.prf (derivative_props (connected_domain 0 (connected_domain-1 nil 3237208618 nil nil nil nil nil nil nil shostak)) (not_one_element 0 (not_one_element-1 nil 3237208618 nil nil nil nil nil nil nil shostak)) (derivative_equivalence1_TCC1 0 (derivative_equivalence1_TCC1-1 nil 3237208618 3243693198 ("" (lemma "connected_domain") (("" (propax) nil nil)) nil) proved-complete ((connected_domain formula-decl nil derivative_props nil)) 6 10 nil nil)) (derivative_equivalence1_TCC2 0 (derivative_equivalence1_TCC2-1 nil 3237208618 3243693198 ("" (lemma "not_one_element") (("" (propax) nil nil)) nil) proved-complete ((not_one_element formula-decl nil derivative_props nil)) 6 0 nil nil)) (derivative_equivalence1 0 (derivative_equivalence1-1 nil 3237208618 3243696283 ("" (skolem!) (("" (rewrite "convergence_equiv[(A[T](x!1))]") (("" (expand "derivable") (("" (expand "deriv") (("" (propax) nil nil)) nil)) nil)) nil)) nil) proved-complete ((convergence_equiv formula-decl nil limit_of_functions nil) (NQ const-decl "real" derivatives nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number_field nonempty-type-from-decl nil number_fields nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil) (bool nonempty-type-eq-decl nil booleans nil) (setof type-eq-decl nil defined_types nil) (A const-decl "setof[nzreal]" derivatives nil) (deriv const-decl "real" derivatives nil) nil) 136 80 nil nil)) (derivative_equivalence2 0 (derivative_equivalence2-3 nil 3237210521 3243877971 ("" (grind :exclude ("abs" "adh") :rewrites ("deriv_TCC[T]" "adherence_fullset[T]") :if-match nil) (("1" (inst + "LAMBDA y : IF y=x!1 THEN 0 ELSE NQ(f!1, x!1)(y - x!1) - D!1 ENDIF") (("1" (split) (("1" (reduce :if-match nil) (("1" (inst - "epsilon!1") (("1" (skolem!) (("1" (inst + "delta!1") (("1" (auto-rewrite "abs") (("1" (skosimp) (("1" (smash) (("1" (inst - "x!2 - x!1") (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -) (("2" (reduce) (("2" (auto-rewrite "times_div1" "times_div2") (("2" (assert) (("2" (rewrite "minus_div2") (("2" (assert) (("2" (rewrite "div_cancel4") nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -) (("2" (reduce) nil nil)) nil)) nil) ("2" (inst? -5) (("2" (skolem!) (("2" (inst + "delta!1") (("2" (skosimp :preds? t) (("2" (assert) (("2" (inst - "x!1 + x!2") (("2" (inst - "x!1 + x!2") (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((IMPLIES const-decl "[bool, bool -> bool]" booleans nil) (= const-decl "[T, T -> boolean]" equalities nil) (x!1 skolem-const-decl "T" derivative_props nil) (numfield nonempty-type-eq-decl nil number_fields nil) (- const-decl "[numfield, numfield -> numfield]" number_fields nil) (A const-decl "setof[nzreal]" derivatives nil) (setof type-eq-decl nil defined_types nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (IF const-decl "[boolean, T, T -> T]" if_def nil) (* const-decl "[numfield, numfield -> numfield]" number_fields nil) (nonzero_real nonempty-type-eq-decl nil reals nil) (minus_div2 formula-decl nil real_props nil) (+ const-decl "[numfield, numfield -> numfield]" number_fields nil) (div_cancel4 formula-decl nil real_props nil) (times_div2 formula-decl nil real_props nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (adherence_fullset formula-decl nil limit_of_functions nil) (convergence const-decl "bool" limit_of_functions nil) (convergence const-decl "bool" convergence_functions nil) (NQ const-decl "real" derivatives nil) (fullset const-decl "set" sets nil) (deriv_TCC formula-decl nil derivatives nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number_field nonempty-type-from-decl nil number_fields nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil)) 200538 8500 t nil) (derivative_equivalence2-2 nil 3237209975 3243877724 ("" (grind :exclude ("abs" "adh") :rewrites ("deriv_TCC[T]" "adherence_fullset[T]") :if-match nil) (("1" (inst + "LAMBDA y : IF y=x!1 THEN 0 ELSE NQ(f!1, x!1)(y - x!1) - D!1 ENDIF") (("1" (split) (("1" (assert) (("1" (skolem!) (("1" (inst - "epsilon!1") (("1" (skolem!) (("1" (inst + "delta!1") (("1" (auto-rewrite "abs") (("1" (skosimp) (("1" (smash) (("1" (inst - "x!2 - x!1") (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -) (("2" (reduce) nil nil)) nil)) nil) ("2" (delete -) (("2" (reduce) nil nil)) nil)) nil) ("2" (inst? -5) (("2" (skolem!) (("2" (inst + "delta!1") (("2" (skosimp :preds? t) (("2" (assert) (("2" (inst - "x!1 + x!2") (("2" (inst - "x!1 + x!2") (("2" (assert) (("2" (use "commutative_mult" ("x" "phi!1(x!1 + x!2)" "y" "x!1")) (("2" (replace -1) (("2" (assert) (("2" (replace -9) (("2" (rewrite "div_distributes" :dir rl) (("2" (assert) (("2" (rewrite "times_div1" :dir rl) (("2" (rewrite "times_div1" :dir rl) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) unfinished ((T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (deriv_TCC formula-decl nil derivatives nil) (fullset const-decl "set" sets nil) (NQ const-decl "real" derivatives nil) (convergence const-decl "bool" convergence_functions nil) (convergence const-decl "bool" limit_of_functions nil) (adherence_fullset formula-decl nil limit_of_functions nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil) (>= const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (IF const-decl "[boolean, T, T -> T]" if_def nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (setof type-eq-decl nil defined_types nil) (A const-decl "setof[nzreal]" derivatives nil) (= const-decl "[T, T -> boolean]" equalities nil) (IMPLIES const-decl "[bool, bool -> bool]" booleans nil) (times_div1 formula-decl nil real_props nil) (div_distributes formula-decl nil real_props nil) (nonzero_real nonempty-type-eq-decl nil reals nil)) 65618 190 t nil) (derivative_equivalence2-1 nil 3237208618 3237209956 ("" (grind :exclude ("abs" "adh") :rewrites ("deriv_TCC[T]" "adherence_fullset[T]") :if-match nil) (("1" (inst + "LAMBDA y : IF y=x!1 THEN 0 ELSE NQ(f!1, x!1)(y - x!1) - D!1 ENDIF") (("1" (split) (("1" (assert) (("1" (skolem!) (("1" (inst - "epsilon!1") (("1" (skolem!) (("1" (inst + "delta!1") (("1" (auto-rewrite "abs") (("1" (skosimp) (("1" (smash) (("1" (inst - "x!2 - x!1") (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -) (("2" (reduce) nil nil)) nil)) nil) ("2" (delete -) (("2" (reduce) nil nil)) nil)) nil) ("2" (inst? -5) (("2" (skolem!) (("2" (inst + "delta!1") (("2" (skosimp :preds? t) (("2" (assert) (("2" (inst - "x!1 + x!2") (("2" (inst - "x!1+x!2") (("2" (assert) (("2" (use "commutative_mult" ("x" "phi!1(x!1 + x!2)" "y" "x!1")) (("2" (replace -1) (("2" (assert) (("2" (replace -9) (("2" (rewrite "div_distributes" :dir rl) (("2" (assert) (("2" (rewrite "times_div1" :dir rl) (("2" (rewrite "times_div1" :dir rl) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((div_distributes formula-decl nil real_props nil) (nonzero_real nonempty-type-eq-decl nil reals nil) (times_div1 formula-decl nil real_props nil) (IMPLIES const-decl "[bool, bool -> bool]" booleans nil) (= const-decl "[T, T -> boolean]" equalities nil) (A const-decl "setof[nzreal]" derivatives nil) (setof type-eq-decl nil defined_types nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (IF const-decl "[boolean, T, T -> T]" if_def nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (adherence_fullset formula-decl nil limit_of_functions nil) (convergence const-decl "bool" limit_of_functions nil) (convergence const-decl "bool" convergence_functions nil) (NQ const-decl "real" derivatives nil) (fullset const-decl "set" sets nil) (deriv_TCC formula-decl nil derivatives nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil)) 559257 57380 t nil)) (deriv_maximum 0 (deriv_maximum-1 nil 3237208618 3243696292 ("" (skosimp*) (("" (auto-rewrite "deriv_TCC[T]") (("" (expand "deriv") (("" (expand "derivable") (("" (assert) (("" (rewrite "lim_fun_def[(A[T](c!1))]") (("" (expand "convergent") (("" (skolem!) (("" (case "l!1 <= 0 AND 0 <= l!1") (("1" (ground) nil nil) ("2" (delete 2) (("2" (expand "convergence") (("2" (split) (("1" (name "E" "{ x : real| 0 < x AND x < b!1 - c!1}") (("1" (case "adh[(A[T](c!1))](E)(0)") (("1" (assert) (("1" (use "convergence_upper_bound[(A[T](c!1))]" ("f" "NQ(f!1, c!1)" "E" "E")) (("1" (ground) (("1" (use "subset_convergence2[(A[T](c!1))]" ("E1" "E" "E2" "fullset[real]")) (("1" (assert) (("1" (rewrite "subset_fullset") nil nil)) nil)) nil) ("2" (replace -2 + rl) (("2" (delete -1 -2 -3 -4 -5 2) (("2" (grind :if-match nil) (("2" (inst? -4) (("2" (assert) (("2" (rewrite "div_mult_pos_le1") nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (replace -1 + rl) (("2" (delete -1 -2 -4 -5 2) (("2" (grind :exclude "abs" :if-match nil) (("2" (inst 1 "min(e!1/2, (b!1-c!1)/2)") (("1" (grind) nil nil) ("2" (use "connected_domain" ("x" "c!1" "y" "b!1")) (("2" (grind) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (name "E" "{ x : real | a!1 - c!1 < x AND x < 0}") (("2" (case "adh[(A[T](c!1))](E)(0)") (("1" (assert) (("1" (use "convergence_lower_bound[(A[T](c!1))]" ("f" "NQ(f!1, c!1)" "E" "E")) (("1" (ground) (("1" (use "subset_convergence2[(A[T](c!1))]" ("E1" "E" "E2" "fullset[real]")) (("1" (assert) (("1" (rewrite "subset_fullset") nil nil)) nil)) nil) ("2" (replace -2 + rl) (("2" (delete -1 -2 -3 -4 -5 2) (("2" (grind :if-match nil) (("2" (inst? -4) (("2" (assert) (("2" (rewrite "div_mult_neg_le2") nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (replace -1 + rl) (("2" (delete -1 -3 -4 -5 2) (("2" (grind :exclude "abs" :if-match nil) (("2" (inst 1 "max(-e!1/2, (a!1 - c!1)/2)") (("1" (grind) nil nil) ("2" (use "connected_domain" ("x" "a!1" "y" "c!1")) (("2" (grind) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete (nil (lim_fun_def formula-decl nil limit_of_functions nil) (NQ const-decl "real" derivatives nil) (convergent const-decl "bool" limit_of_functions nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number_field nonempty-type-from-decl nil number_fields nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil) (bool nonempty-type-eq-decl nil booleans nil) (setof type-eq-decl nil defined_types nil) (A const-decl "setof[nzreal]" derivatives nil) (adh const-decl "setof[real]" convergence_functions nil) (convergence_upper_bound formula-decl nil convergence_functions nil) (NOT const-decl "[bool -> bool]" booleans nil) (div_mult_pos_le1 formula-decl nil real_props nil) (>= const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (+ const-decl "[numfield, numfield -> numfield]" number_fields nil) (fullset const-decl "set" sets nil) (set type-eq-decl nil sets nil) (subset_convergence2 formula-decl nil convergence_functions nil) (subset_fullset formula-decl nil sets_lemmas nil) (min const-decl "{p: real | p <= m AND p <= n}" real_defs nil) (nznum nonempty-type-eq-decl nil number_fields nil) (/ const-decl "[numfield, nznum -> numfield]" number_fields nil) nil nil nil (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (connected_domain formula-decl nil derivative_props nil) (- const-decl "[numfield, numfield -> numfield]" number_fields nil) (numfield nonempty-type-eq-decl nil number_fields nil) (< const-decl "bool" reals nil) (= const-decl "[T, T -> boolean]" equalities nil) (convergence_lower_bound formula-decl nil convergence_functions nil) (div_mult_neg_le2 formula-decl nil real_props nil) (nonpos_real nonempty-type-eq-decl nil real_types nil) (negreal nonempty-type-eq-decl nil real_types nil) (max const-decl "{p: real | p >= m AND p >= n}" real_defs nil) (- const-decl "[numfield -> numfield]" number_fields nil) nil nil (convergence const-decl "bool" limit_of_functions nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (deriv const-decl "real" derivatives nil)) 3412 3030 nil nil)) (deriv_minimum 0 (deriv_minimum-1 nil 3237208618 3243696292 ("" (skosimp) (("" (use "deriv_maximum" ("f" "-f!1")) (("" (auto-rewrite "opposite_derivable[T]" "deriv_opposite[T]") (("" (assert) (("" (delete -1 -2 -3 2) (("" (grind :if-match nil) (("" (inst?) (("" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((deriv_maximum formula-decl nil derivative_props nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number_field nonempty-type-from-decl nil number_fields nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil) nil (deriv_opposite formula-decl nil derivatives nil) (opposite_derivable formula-decl nil derivatives nil) (bool nonempty-type-eq-decl nil booleans nil) (NOT const-decl "[bool -> bool]" booleans nil)) 293 250 nil nil)) (deriv_constant1 0 (deriv_constant1-1 nil 3237208618 3243696294 ("" (skosimp) (("" (auto-rewrite "deriv_TCC[T]" "A[T]") (("" (expand "convergence") (("" (lemma "convergence_locally_constant" ("f" "NQ(f!1, c!1)" "E" "{x:real| abs(x) < min(c!1 - a!1, b!1 - c!1)}" "b" "0" "a" "0")) (("1" (ground) (("1" (grind :exclude ("min" "abs" "NQ" "adh") :if-match nil) (("1" (inst? -4) (("1" (skolem!) (("1" (inst 1 "min(delta!1, min(c!1 - a!1, b!1 - c!1))") (("1" (skosimp) (("1" (inst? -4) (("1" (assert) nil nil)) nil)) nil) ("2" (delete -3 -4 -7) (("2" (expand "min") (("2" (smash) nil nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete 2) (("2" (skosimp :preds? t) (("2" (assert) (("2" (inst -5 "c!1 + x!1") (("2" (grind) nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -3 2) (("2" (lemma "deriv_TCC[T]" ("x" "c!1")) (("2" (grind :exclude ("abs" "min") :if-match nil) (("2" (inst -3 "min(e!1, min(c!1 - a!1, b!1 - c!1))") (("1" (skosimp) (("1" (inst?) (("1" (assert) nil nil)) nil)) nil) ("2" (delete 2) (("2" (grind) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((adh const-decl "setof[real]" convergence_functions nil) (NQ const-decl "real" derivatives nil) (A const-decl "setof[nzreal]" derivatives nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (- const-decl "[numfield, numfield -> numfield]" number_fields nil) (numfield nonempty-type-eq-decl nil number_fields nil) (min const-decl "{p: real | p <= m AND p <= n}" real_defs nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (< const-decl "bool" reals nil) (setof type-eq-decl nil defined_types nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (number_field nonempty-type-from-decl nil number_fields nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (convergence_locally_constant formula-decl nil convergence_functions nil) (+ const-decl "[numfield, numfield -> numfield]" number_fields nil) (fullset const-decl "set" sets nil) (deriv_TCC formula-decl nil derivatives nil) (convergence const-decl "bool" convergence_functions nil) (NOT const-decl "[bool -> bool]" booleans nil) (> const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) nil nil nil nil nil (convergence const-decl "bool" limit_of_functions nil)) 2115 1850 nil nil)) (deriv_constant2 0 (deriv_constant2-1 nil 3237208618 3243696294 ("" (skosimp) (("" (rewrite "derivative_equivalence1") (("" (forward-chain "deriv_constant1") nil nil)) nil)) nil) proved-complete ((derivative_equivalence1 formula-decl nil derivative_props nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number_field nonempty-type-from-decl nil number_fields nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil) (deriv_constant1 formula-decl nil derivative_props nil)) 84 60 nil nil)) (mean_value_aux_TCC1 0 (mean_value_aux_TCC1-1 nil 3237208618 3243693211 ("" (skosimp*) (("" (expand "derivable" -) (("" (inst?) nil nil)) nil)) nil) proved-complete ((number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number_field nonempty-type-from-decl nil number_fields nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil)) 44 40 nil nil)) (mean_value_aux 0 (mean_value_aux-1 nil 3237208618 3243696295 ("" (skosimp) (("" (case "FORALL (x : T) : a!1 <= x AND x <= b!1 IMPLIES f!1(x) = f!1(a!1)") (("1" (case "T_pred((a!1 + b!1)/2)") (("1" (inst 1 "(a!1 + b!1)/2") (("1" (assert) (("1" (use "deriv_constant2" ("a" "a!1" "b" "b!1" "c" "(a!1 + b!1)/2")) (("1" (ground) (("1" (skosimp) (("1" (inst-cp -4 "(a!1+b!1)/2") (("1" (inst -4 "x!1") (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (use "connected_domain" ("x" "a!1" "y" "b!1")) (("2" (assert) nil nil)) nil)) nil) ("2" (skosimp) (("2" (forward-chain "derivable_continuous2[T]") (("2" (case "f!1(x!1) < f!1(a!1)") (("1" (use "min_in_interval[T]" ("a" "a!1" "b" "b!1")) (("1" (assert) (("1" (skosimp) (("1" (expand "derivable") (("1" (inst -8 "c!1") (("1" (use "deriv_minimum" ("a" "a!1" "b" "b!1" "c" "c!1")) (("1" (inst-cp -4 "x!1") (("1" (assert) (("1" (inst 2 "c!1") (("1" (ground) (("1" (skosimp) (("1" (inst?) (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (lemma "connected_domain") (("2" (propax) nil nil)) nil)) nil) ("2" (use "max_in_interval[T]" ("a" "a!1" "b" "b!1")) (("1" (assert) (("1" (skosimp) (("1" (inst-cp -3 "x!1") (("1" (assert) (("1" (expand "derivable") (("1" (inst -8 "c!1") (("1" (use "deriv_maximum" ("a" "a!1" "b" "b!1" "c" "c!1")) (("1" (inst 3 "c!1") (("1" (ground) (("1" (skosimp) (("1" (inst?) (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (lemma "connected_domain") (("2" (propax) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((= const-decl "[T, T -> boolean]" equalities nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (IMPLIES const-decl "[bool, bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (number_field nonempty-type-from-decl nil number_fields nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (connected_domain formula-decl nil derivative_props nil) nil nil (deriv_constant2 formula-decl nil derivative_props nil) (numfield nonempty-type-eq-decl nil number_fields nil) (/= const-decl "boolean" notequal nil) (nznum nonempty-type-eq-decl nil number_fields nil) (/ const-decl "[numfield, nznum -> numfield]" number_fields nil) (+ const-decl "[numfield, numfield -> numfield]" number_fields nil) (derivable_continuous2 formula-decl nil derivatives nil) (max_in_interval formula-decl nil continuous_functions_props nil) (min_in_interval formula-decl nil continuous_functions_props nil) nil nil (deriv_minimum formula-decl nil derivative_props nil) nil (< const-decl "bool" reals nil)) 896 750 nil nil)) (mean_value_TCC1 0 (mean_value_TCC1-1 nil 3237208618 3243693212 ("" (skosimp*) (("" (expand "derivable" -) (("" (inst?) nil nil)) nil)) nil) proved-complete ((number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number_field nonempty-type-from-decl nil number_fields nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil)) 31 40 nil nil)) (mean_value 0 (mean_value-1 nil 3237208618 3243696296 ("" (skosimp) (("" (name-replace "C" "b!1 - a!1" :hide? nil) (("" (name-replace "B" "f!1(b!1) - f!1(a!1)" :hide? nil) (("" (assert) (("" (auto-rewrite-theory "derivatives[T]" :exclude ("derivable" "deriv") :always? t) (("" (use "mean_value_aux" ("f" "f!1 - (B/C) * (I[T] - const(a!1))")) (("" (ground) (("1" (skosimp) (("1" (inst?) (("1" (expand "derivable") (("1" (inst -6 "c!1") (("1" (assert) (("1" (rewrite "deriv_diff[T]") (("1" (case-replace "deriv(f!1, c!1)= B/C") (("1" (rewrite "div_cancel2") nil nil) ("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -3 2) (("2" (grind) (("2" (case "(B/C) * (b!1 - a!1) = B") (("1" (assert) nil nil) ("2" (replace -2 1) (("2" (rewrite "div_cancel2") nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (= const-decl "[T, T -> boolean]" equalities nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (numfield nonempty-type-eq-decl nil number_fields nil) (- const-decl "[numfield, numfield -> numfield]" number_fields nil) (number_field nonempty-type-from-decl nil number_fields nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (T formal-subtype-decl nil derivative_props nil) (mean_value_aux formula-decl nil derivative_props nil) nil nil (/= const-decl "boolean" notequal nil) (nznum nonempty-type-eq-decl nil number_fields nil) (/ const-decl "[numfield, nznum -> numfield]" number_fields nil) (bool nonempty-type-eq-decl nil booleans nil) (bijective? const-decl "bool" functions nil) (I const-decl "(bijective?[T, T])" identity nil) (const const-decl "[T -> real]" real_fun_ops nil) (* const-decl "[numfield, numfield -> numfield]" number_fields nil) nil (deriv const-decl "real" derivatives nil) nil (div_cancel2 formula-decl nil real_props nil) (nonzero_real nonempty-type-eq-decl nil reals nil) (deriv_scal formula-decl nil derivatives nil) (deriv_const formula-decl nil derivatives nil) (deriv_identity formula-decl nil derivatives nil) (deriv_diff formula-decl nil derivatives nil) (identity_derivable formula-decl nil derivatives nil) (const_derivable formula-decl nil derivatives nil) (diff_derivable formula-decl nil derivatives nil) (scal_derivable formula-decl nil derivatives nil) (identity_derivable2 formula-decl nil derivatives nil) (const_derivable2 formula-decl nil derivatives nil) (diff_derivable2 formula-decl nil derivatives nil) (scal_derivable2 formula-decl nil derivatives nil)) 1202 1070 nil nil)) (nonneg_derivative_TCC1 0 (nonneg_derivative_TCC1-1 nil 3237208618 3243693213 ("" (skolem-typepred) (("" (expand "derivable" -) (("" (inst?) nil nil)) nil)) nil) proved-complete ((deriv_fun type-eq-decl nil derivatives nil) (T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (number_field nonempty-type-from-decl nil number_fields nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number nonempty-type-decl nil numbers nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (boolean nonempty-type-decl nil booleans nil)) 35 30 nil nil)) (nonneg_derivative 0 (nonneg_derivative-1 nil 3237208618 3243696297 ("" (skolem-typepred) (("" (expand "derivable") (("" (expand "increasing") (("" (prop) (("1" (skosimp*) (("1" (expand "deriv") (("1" (use "limit_ge1[(A[T](x!1))]") (("1" (ground) (("1" (expand "derivable") (("1" (inst? -2) nil nil)) nil) ("2" (delete -2 2) (("2" (grind :if-match nil) (("2" (rewrite "pos_div_ge") (("2" (ground) (("1" (inst -2 "x!1 + x!2" "x!1") (("1" (assert) nil nil)) nil) ("2" (inst -2 "x!1" "x!1+x!2") (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (skosimp) (("2" (use "mean_value" ("a" "x!1" "b" "y!1")) (("2" (ground) (("2" (skosimp) (("2" (inst?) (("2" (lemma "pos_times_ge" ("x" "deriv(g!1, c!1)" "y" "y!1 - x!1")) (("1" (assert) nil nil) ("2" (inst?) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((deriv const-decl "real" derivatives nil) nil (+ const-decl "[numfield, numfield -> numfield]" number_fields nil) (- const-decl "[numfield, numfield -> numfield]" number_fields nil) (numfield nonempty-type-eq-decl nil number_fields nil) (nonzero_real nonempty-type-eq-decl nil reals nil) (pos_div_ge formula-decl nil real_props nil) (NQ const-decl "real" derivatives nil) (A const-decl "setof[nzreal]" derivatives nil) (setof type-eq-decl nil defined_types nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (limit_ge1 formula-decl nil limit_of_functions nil) (mean_value formula-decl nil derivative_props nil) (pos_times_ge formula-decl nil real_props nil) (increasing const-decl "bool" real_fun_props nil) (deriv_fun type-eq-decl nil derivatives nil) nil (T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (number_field nonempty-type-from-decl nil number_fields nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number nonempty-type-decl nil numbers nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (boolean nonempty-type-decl nil booleans nil)) 985 890 nil nil)) (nonpos_derivative 0 (nonpos_derivative-1 nil 3237208618 3243696298 ("" (skolem-typepred) (("" (expand "derivable") (("" (expand "decreasing") (("" (prop) (("1" (skosimp*) (("1" (expand "deriv") (("1" (use "limit_le1[(A[T](x!1))]") (("1" (ground) (("1" (expand "derivable") (("1" (inst? -2) nil nil)) nil) ("2" (delete -2 2) (("2" (grind :if-match nil) (("2" (rewrite "neg_div_le") (("2" (ground) (("1" (inst -2 "x!1 + x!2" "x!1") (("1" (assert) nil nil)) nil) ("2" (inst -2 "x!1" "x!1+x!2") (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (skosimp) (("2" (use "mean_value" ("a" "x!1" "b" "y!1")) (("2" (ground) (("2" (skosimp) (("2" (inst?) (("2" (lemma "neg_times_le" ("x" "deriv(g!1, c!1)" "y" "y!1 - x!1")) (("1" (assert) nil nil) ("2" (inst?) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((deriv const-decl "real" derivatives nil) nil (+ const-decl "[numfield, numfield -> numfield]" number_fields nil) (- const-decl "[numfield, numfield -> numfield]" number_fields nil) (numfield nonempty-type-eq-decl nil number_fields nil) (nonzero_real nonempty-type-eq-decl nil reals nil) (neg_div_le formula-decl nil real_props nil) (NQ const-decl "real" derivatives nil) (A const-decl "setof[nzreal]" derivatives nil) (setof type-eq-decl nil defined_types nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (limit_le1 formula-decl nil limit_of_functions nil) (mean_value formula-decl nil derivative_props nil) (neg_times_le formula-decl nil real_props nil) (decreasing const-decl "bool" real_fun_props nil) (deriv_fun type-eq-decl nil derivatives nil) nil (T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (number_field nonempty-type-from-decl nil number_fields nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number nonempty-type-decl nil numbers nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (boolean nonempty-type-decl nil booleans nil)) 1010 900 nil nil)) (positive_derivative 0 (positive_derivative-1 nil 3237208618 3243696299 ("" (expand "strict_increasing") (("" (skosimp* :preds? t) (("" (use "mean_value" ("b" "y!1")) (("" (assert) (("" (skosimp) (("" (inst?) (("" (lemma "pos_times_gt" ("x" "deriv(g!1, c!1)" "y" "y!1 - x!1")) (("1" (assert) nil nil) ("2" (expand "derivable" -) (("2" (inst?) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((deriv_fun type-eq-decl nil derivatives nil) nil (T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (number_field nonempty-type-from-decl nil number_fields nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number nonempty-type-decl nil numbers nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (boolean nonempty-type-decl nil booleans nil) (pos_times_gt formula-decl nil real_props nil) nil (deriv const-decl "real" derivatives nil) (numfield nonempty-type-eq-decl nil number_fields nil) (- const-decl "[numfield, numfield -> numfield]" number_fields nil) (mean_value formula-decl nil derivative_props nil) (strict_increasing const-decl "bool" real_fun_props nil)) 457 420 nil nil)) (negative_derivative 0 (negative_derivative-1 nil 3237208618 3243696299 ("" (expand "strict_decreasing") (("" (skosimp* :preds? t) (("" (use "mean_value" ("a" "x!1")) (("" (assert) (("" (skosimp) (("" (inst?) (("" (lemma "neg_times_lt" ("x" "deriv(g!1, c!1)" "y" "y!1 - x!1")) (("1" (assert) nil nil) ("2" (expand "derivable" -) (("2" (inst?) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((deriv_fun type-eq-decl nil derivatives nil) nil (T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (number_field nonempty-type-from-decl nil number_fields nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (number nonempty-type-decl nil numbers nil) (NOT const-decl "[bool -> bool]" booleans nil) (bool nonempty-type-eq-decl nil booleans nil) (boolean nonempty-type-decl nil booleans nil) (neg_times_lt formula-decl nil real_props nil) nil (deriv const-decl "real" derivatives nil) (numfield nonempty-type-eq-decl nil number_fields nil) (- const-decl "[numfield, numfield -> numfield]" number_fields nil) (mean_value formula-decl nil derivative_props nil) (strict_decreasing const-decl "bool" real_fun_props nil)) 440 380 nil nil)) (null_derivative 0 (null_derivative-1 nil 3237208618 3243701937 ("" (apply (repeat* (then (skolem!) (prop)))) (("1" (auto-rewrite "const_derivable2[T]" "deriv_const[T]") (("1" (case-replace "g!1 = const(g!1(x!1))") (("1" (assert) nil nil) ("2" (delete 2) (("2" (apply-extensionality :hide? t) (("2" (grind) nil nil)) nil)) nil)) nil)) nil) ("2" (case "FORALL (x, y : T) : x < y IMPLIES g!1(x) = g!1(y)") (("1" (delete -2) (("1" (expand "constant") (("1" (skosimp) (("1" (inst-cp - "x!1" "y!1") (("1" (inst - "y!1" "x!1") (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (skosimp) (("2" (use "mean_value" ("b" "y!1")) (("2" (assert) (("2" (skosimp) (("2" (inst?) (("2" (assert) (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved-complete ((< const-decl "bool" reals nil) (IMPLIES const-decl "[bool, bool -> bool]" booleans nil) (mean_value formula-decl nil derivative_props nil) (constant const-decl "bool" real_fun_props nil) (deriv_const formula-decl nil derivatives nil) (const const-decl "[T -> real]" real_fun_ops nil) (deriv_fun type-eq-decl nil derivatives nil) nil (bool nonempty-type-eq-decl nil booleans nil) (= const-decl "[T, T -> boolean]" equalities nil) (T formal-subtype-decl nil derivative_props nil) (T_pred const-decl "[real -> boolean]" derivative_props nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number_field -> boolean]" reals nil) (number_field nonempty-type-from-decl nil number_fields nil) (number_field_pred const-decl "[number -> boolean]" number_fields nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil)) 76179 4750 t nil))) \$\$\$continuous_functions.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Continuous functions [ T -> real] % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% continuous_functions [ T : TYPE FROM real ] : THEORY BEGIN IMPORTING limit_of_functions f, f1, f2 : VAR [T -> real] g : VAR [T -> nzreal] u : VAR real x, x0 : VAR T epsilon, delta : VAR posreal %-------------------- % Continuity at x0 %-------------------- continuous(f, x0) : bool = convergence(f, x0, f(x0)) %--- equivalent definitions ---% continuity_def : PROPOSITION continuous(f, x0) IFF FORALL epsilon : EXISTS delta : FORALL x : abs(x - x0) < delta IMPLIES abs(f(x) - f(x0)) < epsilon continuity_def2 : PROPOSITION continuous(f, x0) IFF convergent(f, x0) %------------------------------------------ % Operations preserving continuity at x0 %------------------------------------------ sum_continuous : PROPOSITION continuous(f1, x0) and continuous(f2, x0) implies continuous(f1 + f2, x0) diff_continuous : PROPOSITION continuous(f1, x0) and continuous(f2, x0) implies continuous(f1 - f2, x0) prod_continuous : PROPOSITION continuous(f1, x0) and continuous(f2, x0) implies continuous(f1 * f2, x0) const_continuous : PROPOSITION continuous(const(u), x0) scal_continuous : PROPOSITION continuous(f, x0) implies continuous(u * f, x0) opp_continuous : PROPOSITION continuous(f, x0) implies continuous(- f, x0) div_continuous : PROPOSITION continuous(f, x0) and continuous(g, x0) implies continuous(f/g, x0) inv_continuous : PROPOSITION continuous(g, x0) implies continuous(1/g, x0) identity_continuous : PROPOSITION continuous(I[T], x0) %--------------------------------------------- % Continuity of f in a subset of its domain %--------------------------------------------- E : VAR { S : setof[real] | subset?(S, T_pred) } F : VAR setof[real] continuous(f, E) : bool = FORALL (y : (E)) : convergence(f, E, y, f(y)) continuity_subset : PROPOSITION subset?(F, E) AND continuous(f, E) IMPLIES continuous(f, F) %--- Operation preserving continuity in E ---% sum_set_continuous : PROPOSITION continuous(f1, E) and continuous(f2, E) implies continuous(f1 + f2, E) diff_set_continuous : PROPOSITION continuous(f1, E) and continuous(f2, E) implies continuous(f1 - f2, E) prod_set_continuous : PROPOSITION continuous(f1, E) and continuous(f2, E) implies continuous(f1 * f2, E) const_set_continuous : PROPOSITION continuous(const(u), E) scal_set_continuous : PROPOSITION continuous(f, E) implies continuous(u * f, E) opp_set_continuous : PROPOSITION continuous(f, E) implies continuous(- f, E) div_set_continuous : PROPOSITION continuous(f, E) and continuous(g, E) implies continuous(f/g, E) inv_set_continuous : PROPOSITION continuous(g, E) implies continuous(1/g, E) identity_set_continuous : PROPOSITION continuous(I[T], E) %--------------------------------- % Continuity of f in its domain %--------------------------------- continuous(f) : bool = FORALL x0 : continuous(f, x0) continuous_def2 : PROPOSITION continuous(f) IFF continuous(f, T_pred) continuity_subset2 : PROPOSITION continuous(f) IMPLIES continuous(f, E) %--- Properties ---% continuous_fun: TYPE+ = { f | continuous(f) } nz_continuous_fun: TYPE = { g | continuous(g) } h, h1, h2: VAR continuous_fun h3: VAR nz_continuous_fun sum_fun_continuous : JUDGEMENT +(h1, h2) HAS_TYPE continuous_fun diff_fun_continuous : JUDGEMENT -(h1, h2) HAS_TYPE continuous_fun prod_fun_continuous : JUDGEMENT *(h1, h2) HAS_TYPE continuous_fun const_fun_continuous : JUDGEMENT const(u) HAS_TYPE continuous_fun scal_fun_continuous : JUDGEMENT *(u, h) HAS_TYPE continuous_fun opp_fun_continuous : JUDGEMENT -(h) HAS_TYPE continuous_fun div_fun_continuous : JUDGEMENT /(h, h3) HAS_TYPE continuous_fun id_fun_continuous : JUDGEMENT I[T] HAS_TYPE continuous_fun inv_fun_continuous : PROPOSITION continuous(1/h3) END continuous_functions \$\$\$continuous_functions.prf (|continuous_functions| (|continuity_def| "" (AUTO-REWRITE ("adherence_fullset[T]" "convergence_def[T]" "continuous")) (("" (ASSERT) NIL NIL)) NIL) (|continuity_def2| "" (SKOLEM!) (("" (REWRITE "convergent_in_domain[T]") (("" (EXPAND "continuous") (("" (PROPAX) NIL NIL)) NIL)) NIL)) NIL) (|sum_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuity_def2" "sum_fun_convergent[T]")) NIL NIL) (|diff_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuity_def2" "diff_fun_convergent[T]")) NIL NIL) (|prod_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuity_def2" "prod_fun_convergent[T]")) NIL NIL) (|const_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuity_def2" "const_fun_convergent[T]" "adherence_fullset[T]")) NIL NIL) (|scal_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuity_def2" "scal_fun_convergent[T]")) NIL NIL) (|opp_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuity_def2" "opposite_fun_convergent[T]")) NIL NIL) (|div_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("cv_div[T]")) NIL NIL) (|inv_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("cv_inv[T]")) NIL NIL) (|identity_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuity_def2" "adherence_fullset[T]" "convergent_identity[T]")) NIL NIL) (|continuous_TCC1| "" (GRIND) NIL NIL) (|continuity_subset_TCC1| "" (GRIND :EXCLUDE "continuous") NIL NIL) (|continuity_subset| "" (SKOSIMP) (("" (EXPAND "continuous") (("" (SKOLEM-TYPEPRED) (("" (INST?) (("1" (FORWARD-CHAIN "subset_convergence[T]") (("1" (INST?) (("1" (ASSERT) NIL NIL) ("2" (TYPEPRED "E!1") (("2" (DELETE -4 2) (("2" (GRIND) NIL NIL)) NIL)) NIL) ("3" (REWRITE "member_adherent[T]") (("3" (DELETE -3 2 3) (("3" (TYPEPRED "E!1") (("3" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (DELETE 2) (("2" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|sum_set_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("convergence_sum[T]")) NIL NIL) (|diff_set_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("convergence_diff[T]")) NIL NIL) (|prod_set_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("convergence_prod[T]")) NIL NIL) (|const_set_continuous| "" (GRIND :EXCLUDE ("convergence" "adh") :REWRITES ("convergence_const[T]" "member_adherent[T]")) NIL NIL) (|scal_set_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("convergence_scal[T]")) NIL NIL) (|opp_set_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("convergence_opposite[T]")) NIL NIL) (|div_set_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("convergence_div[T]")) NIL NIL) (|inv_set_continuous| "" (GRIND :EXCLUDE "convergence" :REWRITES ("convergence_inv[T]")) NIL NIL) (|identity_set_continuous| "" (GRIND :EXCLUDE ("convergence" "adh") :REWRITES ("convergence_identity[T]" "member_adherent[T]")) NIL NIL) (|continuous_def2_TCC1| "" (GRIND) NIL NIL) (|continuous_def2| "" (GRIND :EXCLUDE "abs" :IF-MATCH NIL) NIL NIL) (|continuity_subset2| "" (SKOLEM-TYPEPRED) (("" (FLATTEN) (("" (REWRITE "continuous_def2") (("" (FORWARD-CHAIN "continuity_subset") (("" (REWRITE "subset_reflexive") NIL NIL)) NIL)) NIL)) NIL)) NIL) (|continuous_fun_TCC1| "" (INST + "I[T]") (("" (REWRITE "continuous_def2") (("" (REWRITE "identity_set_continuous") (("" (REWRITE "subset_reflexive") NIL NIL)) NIL)) NIL)) NIL) (|sum_fun_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuous_def2" "sum_set_continuous" "subset_reflexive")) NIL NIL) (|diff_fun_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuous_def2" "diff_set_continuous" "subset_reflexive")) NIL NIL) (|prod_fun_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuous_def2" "prod_set_continuous" "subset_reflexive")) NIL NIL) (|const_fun_continuous| "" (EXPAND "continuous") (("" (GRIND :DEFS NIL :REWRITES ("const_continuous")) NIL NIL)) NIL) (|scal_fun_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuous_def2" "scal_set_continuous" "subset_reflexive")) NIL NIL) (|opp_fun_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuous_def2" "opp_set_continuous" "subset_reflexive")) NIL NIL) (|div_fun_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuous_def2" "div_set_continuous" "subset_reflexive")) NIL NIL) (|id_fun_continuous| "" (EXPAND "continuous") (("" (SKOLEM!) (("" (REWRITE "identity_continuous") NIL NIL)) NIL)) NIL) (|inv_fun_continuous| "" (GRIND :DEFS NIL :REWRITES ("continuous_def2" "inv_set_continuous" "subset_reflexive")) NIL NIL)) \$\$\$absolute_value.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % More properites of absolute value %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% absolute_value : THEORY BEGIN x, y : VAR real z : VAR nzreal null_abs : PROPOSITION abs(x) = 0 IFF x = 0 null_abs2 : PROPOSITION abs(0) = 0 positive_abs : PROPOSITION abs(z) > 0 diff_abs : PROPOSITION abs(x) - abs(y) <= abs(x - y) % sum_abs is triangle in prelude % sum_abs : PROPOSITION abs(x + y) <= abs(x) + abs(y) neg_abs : PROPOSITION abs(- x) = abs(x) % prod_abs is abs_mult in prelude % prod_abs : PROPOSITION abs(x * y) = abs(x) * abs(y) inverse_abs : PROPOSITION abs(1/z) = 1/abs(z) divide_abs : PROPOSITION abs(x/z) = abs(x)/abs(z) abs_abs : PROPOSITION abs(abs(x)) = abs(x) abs_square : PROPOSITION abs(x * x) = x * x %--- abs(x - y) as distance between x and y ---% t, a, b : VAR real diff_abs_commute : PROPOSITION abs(x - y) = abs(y - x) null_distance : PROPOSITION x = y IFF abs(x - y) = 0 triangle2 : PROPOSITION abs(x - t) < a AND abs(x - y) < b IMPLIES abs(t - y) < a + b END absolute_value \$\$\$absolute_value.prf (|absolute_value| (|null_abs| "" (SKOLEM!) (("" (PROP) (("1" (EXPAND "abs") (("1" (LIFT-IF) (("1" (ASSERT) NIL))))) ("2" (REPLACE -1) (("2" (EXPAND "abs") (("2" (PROPAX) NIL))))))))) (|null_abs2| "" (EXPAND "abs") (("" (PROPAX) NIL))) (|positive_abs| "" (SKOLEM!) (("" (ASSERT) NIL))) (|diff_abs| "" (SKOLEM!) (("" (EXPAND "abs") (("" (LIFT-IF) (("" (LIFT-IF) (("" (LIFT-IF) (("" (ASSERT) NIL))))))))))) (|sum_abs| "" (LEMMA "triangle") (("" (PROPAX) NIL))) (|neg_abs| "" (SKOLEM!) (("" (EXPAND "abs") (("" (LIFT-IF) (("" (ASSERT) (("" (LIFT-IF) (("" (ASSERT) NIL))))))))))) (|prod_abs| "" (LEMMA "abs_mult") (("" (PROPAX) NIL))) (|inverse_abs| "" (SKOLEM!) (("" (EXPAND "abs") (("" (CASE "1 / z!1 < 0") (("1" (ASSERT) (("1" (REWRITE "quotient_neg_lt") (("1" (ASSERT) NIL))))) ("2" (ASSERT) (("2" (REWRITE "quotient_neg_lt") (("2" (ASSERT) NIL))))))))))) (|divide_abs| "" (SKOLEM!) (("" (LEMMA "times_div1" ("x" "x!1" "y" "1" "n0z" "z!1")) (("" (ASSERT) (("" (REPLACE -1 + RL) (("" (REWRITE "prod_abs") (("" (REWRITE "inverse_abs") (("" (ASSERT) NIL))))))))))))) (|abs_abs| "" (SKOLEM!) (("" (EXPAND "abs" 1 1) (("" (LIFT-IF) (("" (GROUND) NIL))))))) (|abs_square| "" (SKOLEM!) (("" (REWRITE "prod_abs") (("" (GRIND) NIL))))) (|diff_abs_commute| "" (SKOLEM!) (("" (LEMMA "neg_abs" ("x" "x!1 - y!1")) (("" (ASSERT) NIL))))) (|null_distance| "" (SKOLEM!) (("" (REWRITE "null_abs") (("" (GROUND) NIL))))) (|triangle2| "" (SKOSIMP) (("" (REWRITE "diff_abs_commute") (("" (LEMMA "sum_abs" ("x" "t!1 - x!1" "y" "x!1 - y!1")) (("" (ASSERT) NIL)))))))) \$\$\$real_facts.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Properties of real numbers % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% real_facts : THEORY BEGIN %---------------------------------------- % More properties of archimedean field %---------------------------------------- archimedean2 : THEOREM FORALL (x : posreal) : EXISTS (a : posnat) : 1/a < x archimedean3 : THEOREM FORALL (x : nonneg_real) : (FORALL (a : posnat) : x <= 1/a) implies x = 0 %------------------------------------------------- % Every real is between two successive integers %------------------------------------------------- nat_interval : LEMMA FORALL (x : nonneg_real) : EXISTS (a : nat) : a <= x and x < a + 1 int_interval : PROPOSITION FORALL (x : real) : EXISTS (a : integer) : a <= x and x < a +1 %--------------------------------------- % Short cuts for lub and glb of sets %--------------------------------------- U: VAR (bounded_above?) V: VAR (bounded_below?) x, y: VAR real epsilon: VAR posreal lub_is_bound: LEMMA FORALL (x: (U)): x <= lub(U) lub_is_lub: LEMMA lub(U) <= y IFF FORALL (x: (U)): x <= y adherence_sup: LEMMA FORALL epsilon: EXISTS (x: (U)): lub(U) - epsilon < x glb_is_bound: LEMMA FORALL (x: (V)): glb(V) <= x glb_is_glb: LEMMA y <= glb(V) IFF FORALL (x: (V)): y <= x adherence_inf: LEMMA FORALL epsilon: EXISTS (x: (V)): x < glb(V) + epsilon END real_facts \$\$\$real_facts.prf (|real_facts| (|archimedean2| "" (SKOLEM!) (("" (LEMMA "axiom_of_archimedes" ("x" "1/x!1")) (("" (SKOLEM!) (("" (ASSERT) (("" (INST 1 "i!1") (("" (REWRITE "div_mult_pos_lt1") (("" (REWRITE "div_mult_pos_lt1") (("" (ASSERT) NIL))))))))))))))) (|archimedean3| "" (SKOSIMP) (("" (CASE "x!1 > 0") (("1" (LEMMA "archimedean2" ("x" "x!1")) (("1" (SKOLEM!) (("1" (INST?) (("1" (ASSERT) NIL))))) ("2" (PROPAX) NIL))) ("2" (ASSERT) NIL))))) (|nat_interval| "" (SKOLEM!) (("" (LEMMA "wf_nat") (("" (EXPAND "well_founded?") (("" (INST -1 "lambda (b : nat) : x!1 < b") (("" (BETA) (("" (SPLIT) (("1" (SKOLEM!) (("1" (TYPEPRED "y!1") (("1" (INST -2 "y!1 - 1") (("1" (ASSERT) NIL) ("2" (INST 2 "y!1 - 1") (("2" (ASSERT) NIL))))))))) ("2" (LEMMA "axiom_of_archimedes" ("x" "x!1")) (("2" (SKOLEM!) (("2" (INST?) (("2" (ASSERT) NIL))))))))))))))))))) (|int_interval| "" (SKOLEM!) (("" (CASE "x!1 >= 0") (("1" (LEMMA "nat_interval" ("x" "x!1")) (("1" (SKOSIMP) (("1" (INST 1 "a!1") (("1" (ASSERT) NIL))))) ("2" (PROPAX) NIL))) ("2" (LEMMA "nat_interval" ("x" "- x!1")) (("1" (SKOSIMP) (("1" (CASE "a!1 = -x!1") (("1" (INST 2 "- a!1") (("1" (ASSERT) NIL))) ("2" (INST 3 "-a!1 - 1") (("2" (ASSERT) NIL))))))) ("2" (ASSERT) NIL))))))) (|lub_is_bound| "" (SKOLEM!) (("" (TYPEPRED "lub(U!1)") (("" (GRIND) NIL NIL)) NIL)) NIL) (|lub_is_lub| "" (SKOLEM!) (("" (TYPEPRED "lub(U!1)") (("" (GRIND :IF-MATCH NIL) (("1" (INST? -3) (("1" (INST? -2) (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (INST? -2) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|adherence_sup| "" (SKOLEM!) (("" (USE "lub_is_lub" ("y" "lub(U!1) - epsilon!1")) (("" (ASSERT) (("" (SKOLEM!) (("" (INST + "x!1") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|glb_is_bound| "" (SKOLEM!) (("" (TYPEPRED "glb(V!1)") (("" (GRIND) NIL NIL)) NIL)) NIL) (|glb_is_glb| "" (SKOLEM!) (("" (TYPEPRED "glb(V!1)") (("" (GRIND :IF-MATCH NIL) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL) ("2" (INST? -2) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|adherence_inf| "" (SKOLEM!) (("" (USE "glb_is_glb" ("y" "glb(V!1) + epsilon!1")) (("" (ASSERT) (("" (SKOLEM!) (("" (INST + "x!1") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) \$\$\$epsilon_lemmas.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Lemmas used for limits of product and inverse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% epsilon_lemmas : THEORY BEGIN x1, x2, y1, y2 : VAR real e, e1, e2 : VAR posreal IMPORTING real_facts, absolute_value %--- Lemmas for product ---% prod_bound : LEMMA abs(x1 - y1) < e1 AND abs(x2 - y2) < e2 IMPLIES abs(x1 * x2 - y1 * y2) < e1 * e2 + abs(y1) * e2 + abs(y2) * e1 prod_epsilon : LEMMA EXISTS e1, e2 : e1 * e2 + abs(y1) * e2 + abs(y2) * e1 < e %--- Lemmas for inverse ---% inv_bound : LEMMA abs(x1 - y1) < e1 and e1 < abs(y1) and x1 /= 0 and y1 /= 0 IMPLIES abs(1/x1 - 1/y1) < e1 / (abs(y1) * (abs(y1) - e1)) inv_epsilon1 : LEMMA y1 /= 0 IMPLIES EXISTS e1 : e1 < abs(y1) and e1 < e * (abs(y1) - e1) inv_epsilon : LEMMA y1 /= 0 IMPLIES EXISTS e1 : e1 < abs(y1) and e1 / (abs(y1) * (abs(y1) - e1)) < e END epsilon_lemmas \$\$\$epsilon_lemmas.prf (epsilon_lemmas (prod_bound 0 (prod_bound-1 nil 3236953990 3236954527 ("" (skosimp) (("" (lemma "sum_abs") (("" (inst -1 "(x1!1 - y1!1) * x2!1" "(x2!1 - y2!1) * y1!1") (("" (auto-rewrite "prod_abs") (("" (do-rewrite) (("" (assert) (("" (case "abs(x2!1 - y2!1) * abs(y1!1) <= e2!1 * abs(y1!1)") (("1" (case "abs(x1!1 - y1!1) * abs(x2!1) < e1!1 * (abs(y2!1) + e2!1)") (("1" (assert) nil nil) ("2" (delete -1 -2 2) (("2" (rewrite "lt_times_lt_pos1" 1) (("2" (lemma "diff_abs") (("2" (inst -1 "x2!1" "y2!1") (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -1 2) (("2" (rewrite "le_times_le_pos" 1) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((sum_abs formula-decl nil absolute_value nil) (le_times_le_pos formula-decl nil real_props nil) (< const-decl "bool" reals nil) (+ const-decl "[real, real -> real]" reals nil) (lt_times_lt_pos1 formula-decl nil real_props nil) (diff_abs formula-decl nil absolute_value nil) (bool nonempty-type-eq-decl nil booleans nil) (<= const-decl "bool" reals nil) (>= const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (> const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (prod_abs formula-decl nil absolute_value nil) (- const-decl "[real, real -> real]" reals nil) (* const-decl "[real, real -> real]" reals nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil)) 3234 2690 nil nil)) (prod_epsilon 0 (prod_epsilon-1 nil 3236953990 3236954530 ("" (skolem!) (("" (case "EXISTS (u, v, w : posreal) : u * v <= e!1/3 and abs(y1!1) * v < e!1/3 and abs(y2!1) * w < e!1/3") (("1" (skosimp) (("1" (inst 1 "min(u!1, w!1)" "v!1") (("1" (case "min(u!1, w!1) * v!1 <= u!1 * v!1 and abs(y2!1) * min(u!1, w!1) <= abs(y2!1) * w!1") (("1" (flatten) (("1" (assert) nil nil)) nil) ("2" (delete -1 -2 -3 2) (("2" (split) (("1" (rewrite "both_sides_times_pos_le1") (("1" (assert) nil nil)) nil) ("2" (rewrite "le_times_le_pos") nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete 2) (("2" (name "f" "e!1/3") (("2" (replace -1) (("2" (case "FORALL (x : nonneg_real) : x * (f / (x+1)) < f") (("1" (inst-cp -1 "abs(y1!1)") (("1" (inst -1 "abs(y2!1)") (("1" (inst 1 "abs(y1!1) + 1" "f / (abs(y1!1) + 1)" "f / (abs(y2!1) + 1)") (("1" (split) (("1" (rewrite "div_cancel1") (("1" (assert) nil nil)) nil) ("2" (propax) nil nil) ("3" (propax) nil nil)) nil)) nil)) nil)) nil) ("2" (delete -1 2) (("2" (skolem!) (("2" (rewrite "times_div1") (("2" (rewrite "div_mult_pos_lt1") nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (< const-decl "bool" reals nil) (/ const-decl "[real, nzreal -> real]" reals nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (* const-decl "[real, real -> real]" reals nil) (<= const-decl "bool" reals nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (min const-decl "{p: real | p <= m AND p <= n}" real_defs nil) (le_times_le_pos formula-decl nil real_props nil) (both_sides_times_pos_le1 formula-decl nil real_props nil) (= const-decl "[T, T -> boolean]" equalities nil) (+ const-decl "[real, real -> real]" reals nil) (div_cancel1 formula-decl nil real_props nil) (nonzero_real nonempty-type-eq-decl nil reals nil) (div_mult_pos_lt1 formula-decl nil real_props nil) (times_div1 formula-decl nil real_props nil)) 2252 1720 nil nil)) (inv_bound_TCC1 0 (inv_bound_TCC1-1 nil 3236953990 3236954530 ("" (skosimp) (("" (rewrite "zero_times3") (("" (assert) nil nil)) nil)) nil) proved ((zero_times3 formula-decl nil real_props nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (- const-decl "[real, real -> real]" reals nil) (> const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil)) 331 220 nil nil)) (inv_bound 0 (inv_bound-2 "Maybe a bug in assert. Assert does not solve an obvious goal anymore." 3236955785 3236955918 ("" (skosimp) (("" (assert) (("" (lemma "null_abs" ("x" "x1!1")) (("" (replace 1) (("" (ground) (("" (auto-rewrite "zero_times3") (("" (case "abs(1 / x1!1 - 1 / y1!1) = abs(x1!1 - y1!1) / (abs(y1!1) * abs(x1!1))") (("1" (lemma "lt_div_lt_pos2") (("1" (inst - "abs(x1!1 - y1!1)" "abs(y1!1) * (abs(y1!1) - e1!1)" "abs(y1!1) * abs(x1!1)" "e1!1") (("1" (split) (("1" (assert) (("1" (replace -2) (("1" (propax) nil nil)) nil)) nil) ("2" (propax) nil nil) ("3" (delete -1 5) (("3" (rewrite "both_sides_times_pos_le2") (("3" (use "diff_abs" ("x" "y1!1" "y" "x1!1")) (("3" (rewrite "diff_abs_commute" -2) (("3" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -1 5) (("2" (case "abs(y1!1) * (abs(y1!1) - e1!1) > 0") (("1" (assert) nil nil) ("2" (delete 2) (("2" (rewrite "pos_times_gt") nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete 5 -1) (("2" (auto-rewrite "minus_div1" "divide_abs" "prod_abs") (("2" (assert) (("2" (rewrite "diff_abs_commute" 1) (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((minus_div1 formula-decl nil real_props nil) (zero_times3 formula-decl nil real_props nil) (prod_abs formula-decl nil absolute_value nil) (divide_abs formula-decl nil absolute_value nil) (lt_div_lt_pos2 formula-decl nil real_props nil) (pos_times_gt formula-decl nil real_props nil) (both_sides_times_pos_le2 formula-decl nil real_props nil) (diff_abs_commute formula-decl nil absolute_value nil) (diff_abs formula-decl nil absolute_value nil) (e1!1 skolem-const-decl "posreal" epsilon_lemmas nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (y1!1 skolem-const-decl "real" epsilon_lemmas nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (= const-decl "[T, T -> boolean]" equalities nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (- const-decl "[real, real -> real]" reals nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (/ const-decl "[real, nzreal -> real]" reals nil) (* const-decl "[real, real -> real]" reals nil) (null_abs formula-decl nil absolute_value nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil)) 54229 22400 t shostak) (inv_bound-1 nil 3236953990 3236954533 ("" (skosimp) (("" (assert) (("" (lemma "null_abs" ("x" "x1!1")) (("" (replace 1) (("" (ground) (("" (auto-rewrite "zero_times3") (("" (case "abs(1 / x1!1 - 1 / y1!1) = abs(x1!1 - y1!1) / (abs(y1!1) * abs(x1!1))") (("1" (lemma "lt_div_lt_pos2") (("1" (inst - "abs(x1!1 - y1!1)" "abs(y1!1) * (abs(y1!1) - e1!1)" "abs(y1!1) * abs(x1!1)" "e1!1") (("1" (split) (("1" (assert) nil nil) ("2" (propax) nil nil) ("3" (delete -1 5) (("3" (rewrite "both_sides_times_pos_le2") (("3" (use "diff_abs" ("x" "y1!1" "y" "x1!1")) (("3" (rewrite "diff_abs_commute" -2) (("3" (assert) nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete -1 5) (("2" (case "abs(y1!1) * (abs(y1!1) - e1!1) > 0") (("1" (assert) nil nil) ("2" (delete 2) (("2" (rewrite "pos_times_gt") nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (delete 5 -1) (("2" (auto-rewrite "minus_div1" "divide_abs" "prod_abs") (("2" (assert) (("2" (rewrite "diff_abs_commute" 1) (("2" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((minus_div1 formula-decl nil real_props nil) (zero_times3 formula-decl nil real_props nil) (prod_abs formula-decl nil absolute_value nil) (divide_abs formula-decl nil absolute_value nil) (lt_div_lt_pos2 formula-decl nil real_props nil) (pos_times_gt formula-decl nil real_props nil) (both_sides_times_pos_le2 formula-decl nil real_props nil) (diff_abs_commute formula-decl nil absolute_value nil) (diff_abs formula-decl nil absolute_value nil) (e1!1 skolem-const-decl "posreal" epsilon_lemmas nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (y1!1 skolem-const-decl "real" epsilon_lemmas nil) (AND const-decl "[bool, bool -> bool]" booleans nil) (= const-decl "[T, T -> boolean]" equalities nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (- const-decl "[real, real -> real]" reals nil) (/= const-decl "boolean" notequal nil) (nzreal nonempty-type-eq-decl nil reals nil) (/ const-decl "[real, nzreal -> real]" reals nil) (* const-decl "[real, real -> real]" reals nil) (null_abs formula-decl nil absolute_value nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil)) 3102 2540 nil nil)) (inv_epsilon1 0 (inv_epsilon1-1 nil 3236953990 3236954535 ("" (skosimp) (("" (lemma "null_abs" ("x" "y1!1")) (("" (assert) (("" (case "EXISTS (c : posreal) : c < e!1 / (1 + e!1)") (("1" (skolem!) (("1" (inst 3 "abs(y1!1) * c!1") (("1" (split) (("1" (lemma "both_sides_times_pos_lt2" ("pz" "abs(y1!1)" "x" "c!1" "y" "1")) (("1" (assert) (("1" (case "e!1 / (1 + e!1) < (1 + e!1) / (1 + e!1)") (("1" (rewrite "div_simp") (("1" (assert) nil nil)) nil) ("2" (rewrite "both_sides_div_pos_lt1") nil nil)) nil)) nil)) nil) ("2" (lemma "both_sides_times_pos_lt2") (("2" (inst -1 "abs(y1!1)" "c!1" "e!1 * (1 - c!1)") (("2" (assert) (("2" (delete 2) (("2" (rewrite "div_mult_pos_lt2") nil nil)) nil)) nil)) nil)) nil)) nil) ("2" (rewrite "pos_times_gt") nil nil)) nil)) nil) ("2" (delete 2 3 4) (("2" (inst 1 "e!1 / (2 + e!1)") (("2" (rewrite "both_sides_div_pos_lt2") nil nil)) nil)) nil)) nil)) nil)) nil)) nil) proved ((real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (null_abs formula-decl nil absolute_value nil) (+ const-decl "[real, real -> real]" reals nil) (/ const-decl "[real, nzreal -> real]" reals nil) (nzreal nonempty-type-eq-decl nil reals nil) (/= const-decl "boolean" notequal nil) (< const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (* const-decl "[real, real -> real]" reals nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (y1!1 skolem-const-decl "real" epsilon_lemmas nil) (c!1 skolem-const-decl "posreal" epsilon_lemmas nil) (div_mult_pos_lt2 formula-decl nil real_props nil) (- const-decl "[real, real -> real]" reals nil) (both_sides_times_pos_lt2 formula-decl nil real_props nil) (div_simp formula-decl nil real_props nil) (nonzero_real nonempty-type-eq-decl nil reals nil) (both_sides_div_pos_lt1 formula-decl nil real_props nil) (pos_times_gt formula-decl nil real_props nil) (both_sides_div_pos_lt2 formula-decl nil real_props nil)) 1947 1390 nil nil)) (inv_epsilon_TCC1 0 (inv_epsilon_TCC1-1 nil 3236953990 3236954535 ("" (skosimp*) (("" (rewrite "zero_times3") (("" (assert) nil nil)) nil)) nil) proved ((zero_times3 formula-decl nil real_props nil) (number nonempty-type-decl nil numbers nil) (boolean nonempty-type-decl nil booleans nil) (real_pred const-decl "[number -> boolean]" reals nil) (real nonempty-type-from-decl nil reals nil) (bool nonempty-type-eq-decl nil booleans nil) (>= const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (- const-decl "[real, real -> real]" reals nil) (> const-decl "bool" reals nil) (posreal nonempty-type-eq-decl nil real_types nil)) 218 170 nil nil)) (inv_epsilon 0 (inv_epsilon-1 nil 3236953990 3236954537 ("" (skosimp) (("" (lemma "null_abs" ("x" "y1!1")) (("" (assert) (("" (lemma "inv_epsilon1" ("y1" "y1!1" "e" "e!1 * abs(y1!1)")) (("1" (assert) (("1" (skosimp) (("1" (inst 3 "e1!1") (("1" (assert) (("1" (rewrite "div_mult_pos_lt1") (("1" (delete -2 4) (("1" (lemma "posreal_mult_closed" ("x" "abs(y1!1)" "y" "abs(y1!1) - e1!1")) (("1" (assert) nil nil)) nil)) nil)) nil)) nil)) nil)) nil)) nil) ("2" (rewrite "posreal_mult_closed") nil nil)) nil)) nil)) nil)) nil) proved ((real nonempty-type-from-decl nil reals nil) (real_pred const-decl "[number -> boolean]" reals nil) (boolean nonempty-type-decl nil booleans nil) (number nonempty-type-decl nil numbers nil) (null_abs formula-decl nil absolute_value nil) (abs const-decl "{n: nonneg_real | n >= m}" real_defs nil) (* const-decl "[real, real -> real]" reals nil) (posreal nonempty-type-eq-decl nil real_types nil) (> const-decl "bool" reals nil) (nonneg_real nonempty-type-eq-decl nil real_types nil) (>= const-decl "bool" reals nil) (bool nonempty-type-eq-decl nil booleans nil) (inv_epsilon1 formula-decl nil epsilon_lemmas nil) (posreal_mult_closed formula-decl nil real_axioms nil) (- const-decl "[real, real -> real]" reals nil) (div_mult_pos_lt1 formula-decl nil real_props nil) (AND const-decl "[bool, bool -> bool]" booleans nil)) 1852 1460 nil nil))) \$\$\$real_fun_ops.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Operations on functions : [ T -> real] % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% real_fun_ops [ T : TYPE ] : THEORY BEGIN f1, f2 : VAR [T -> real] f3 : VAR [T -> nzreal] a : VAR real x : VAR T %------------------------------------------ % Conversion : real to constant function % (Already there in PVS2.3 prelude: K_conversion) % (Removed from PVS2.3.1 prelude) %------------------------------------------ const(a) : [T -> real] = LAMBDA x : a CONVERSION const; %-------------- % Operations %-------------- +(f1, f2) : [T -> real] = LAMBDA x : f1(x) + f2(x); -(f1) : [T -> real] = LAMBDA x : -f1(x); *(f1, f2) : [T -> real] = LAMBDA x : f1(x) * f2(x); *(a, f1) : [T -> real] = LAMBDA x : a * f1(x); -(f1, f2) : [T -> real] = LAMBDA x : f1(x) - f2(x); /(f1, f3) : [T -> real] = LAMBDA x : f1(x) / f3(x); /(a, f3) : [T -> real] = LAMBDA x : a / f3(x); inv(f3) : [T -> real] = 1 / f3; abs(f1) : [T -> nonneg_real] = LAMBDA x : abs(f1(x)); %------------------ % Rewrite rules %------------------ diff_function : PROPOSITION f1 - f2 = f1 + (- f2) div_function : PROPOSITION f1 / f3 = f1 * (1 /f3) scal_function : PROPOSITION a * f1 = const(a) * f1 scaldiv_function : PROPOSITION a / f3 = const(a) / f3 negneg_function : PROPOSITION - (- f1) = f1 END real_fun_ops \$\$\$real_fun_ops.prf (|real_fun_ops| (|diff_function| "" (SKOLEM!) (("" (AUTO-REWRITE-THEORY "real_fun_ops") (("" (APPLY-EXTENSIONALITY) NIL))))) (|div_function| "" (SKOLEM!) (("" (AUTO-REWRITE-THEORY "real_fun_ops") (("" (APPLY-EXTENSIONALITY) NIL))))) (|scal_function| "" (SKOLEM!) (("" (APPLY-EXTENSIONALITY :HIDE? T) (("" (GRIND) NIL NIL)) NIL)) NIL) (|scaldiv_function| "" (SKOLEM!) (("" (APPLY-EXTENSIONALITY :HIDE? T) (("" (GRIND) NIL NIL)) NIL)) NIL) (|negneg_function| "" (SKOLEM!) (("" (AUTO-REWRITE "-") (("" (APPLY-EXTENSIONALITY :HIDE? T) NIL)))))) \$\$\$convergence_functions.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % General convergence of functions [T -> real] % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% convergence_functions [T : TYPE FROM real] : THEORY BEGIN IMPORTING real_fun_ops, epsilon_lemmas epsilon, delta : VAR posreal e, e1, e2 : VAR posreal E, E1, E2 : VAR setof[real] f, f1, f2 : VAR [T -> real] g : VAR [T -> nzreal] l, l1, l2, a, b, z : VAR real x, y : VAR T %--------------------------- % Reals adherent to a set %--------------------------- adh(E) : setof[real] = { z | FORALL e : EXISTS x : E(x) AND abs(x - z) < e } member_adherent : LEMMA E(x) IMPLIES adh(E)(x) adherence_subset1 : LEMMA subset?(E1, E2) AND adh(E1)(z) IMPLIES adh(E2)(z) adherence_subset2 : LEMMA subset?(E1, E2) IMPLIES subset?(adh(E1), adh(E2)) adherence_prop1 : LEMMA FORALL e, E, (a : (adh(E))) : EXISTS x : E(x) AND abs(x - a) < e adherence_prop2 : LEMMA FORALL e1, e2, E, (a : (adh(E))) : EXISTS x : E(x) AND abs(x - a) < e1 AND abs(x - a) < e2 %------------------------------------------------------ % Definition of convergence and immediate properties %------------------------------------------------------ convergence(f, E, a, l) : bool = adh(E)(a) AND FORALL epsilon : EXISTS delta : FORALL x : E(x) AND abs(x - a) < delta IMPLIES abs(f(x) - l) < epsilon convergence_unicity : PROPOSITION FORALL E, f, a, l1, l2 : convergence(f, E, a, l1) AND convergence(f, E, a, l2) IMPLIES l1 = l2 subset_convergence : PROPOSITION subset?(E1, E2) IMPLIES FORALL f, (a : (adh(E1))), l : convergence(f, E2, a, l) IMPLIES convergence(f, E1, a, l) subset_convergence2 : PROPOSITION FORALL E1, E2, f, (a : (adh(E1))), l : subset?(E1, E2) AND convergence(f, E2, a, l) IMPLIES convergence(f, E1, a, l) convergence_in_domain : PROPOSITION FORALL f, x, l : E(x) AND convergence(f, E, x, l) IMPLIES l = f(x) %---------------------------------- % Limits and function operations %---------------------------------- convergence_sum : PROPOSITION FORALL E, f1, f2, a, l1, l2 : convergence(f1, E, a, l1) AND convergence(f2, E, a, l2) IMPLIES convergence(f1 + f2, E, a, l1 + l2) convergence_opposite : PROPOSITION FORALL E, f1, a, l1 : convergence(f1, E, a, l1) IMPLIES convergence(- f1, E, a, - l1) convergence_diff : PROPOSITION FORALL E, f1, f2, a, l1, l2 : convergence(f1, E, a, l1) AND convergence(f2, E, a, l2) IMPLIES convergence(f1 - f2, E, a, l1 - l2) convergence_prod : PROPOSITION FORALL E, f1, f2, a, l1, l2 : convergence(f1, E, a, l1) AND convergence(f2, E, a, l2) IMPLIES convergence(f1 * f2, E, a, l1 * l2) convergence_const : PROPOSITION FORALL E, (a : (adh(E))), b : convergence(const(b), E, a, b) convergence_scal : PROPOSITION FORALL E, f1, a, l1, b : convergence(f1, E, a, l1) IMPLIES convergence(b * f1, E, a, b * l1) convergence_inv : PROPOSITION FORALL E, g, a, l1: convergence(g, E, a, l1) AND l1 /= 0 IMPLIES convergence(1/g, E, a, 1/l1) convergence_div : PROPOSITION FORALL E, f, g, a, l1, l2 : convergence(f, E, a, l1) AND convergence(g, E, a, l2) AND l2 /= 0 IMPLIES convergence(f/g, E, a, l1/l2) %--------------------- % Identity function %--------------------- convergence_identity : PROPOSITION FORALL E, (a : (adh(E))) : convergence(I[T], E, a, a) %----------------------------- % Limit preserve order %----------------------------- convergence_order : PROPOSITION FORALL E, f1, f2, a, l1, l2 : convergence(f1, E, a, l1) AND convergence(f2, E, a, l2) AND (FORALL x : E(x) IMPLIES f1(x) <= f2(x)) IMPLIES l1 <= l2 %------------------------------------------- % Bounds on function are bounds on limits %------------------------------------------- convergence_lower_bound : COROLLARY FORALL E, f, b, a, l : convergence(f, E, a, l) AND (FORALL x : E(x) IMPLIES b <= f(x)) IMPLIES b <= l convergence_upper_bound : COROLLARY FORALL E, f, b, a, l : convergence(f, E, a, l) AND (FORALL x : E(x) IMPLIES f(x) <= b) IMPLIES l <= b %-------------------------- % Function constant on E %-------------------------- convergence_locally_constant : PROPOSITION FORALL E, f, b, (a : (adh(E))) : (FORALL x : E(x) IMPLIES f(x) = b) IMPLIES convergence(f, E, a, b) %------------- % Squeezing %------------- convergence_squeezing : PROPOSITION FORALL f1, f2, f, a, l : convergence(f1, E, a, l) AND convergence(f2, E, a, l) AND (FORALL x : E(x) IMPLIES f1(x) <= f(x) AND f(x) <= f2(x)) IMPLIES convergence(f, E, a, l) END convergence_functions \$\$\$convergence_functions.prf (|convergence_functions| (|member_adherent| "" (GRIND :DEFS NIL :REWRITES ("adh" "null_abs2")) NIL NIL) (|adherence_subset1| "" (GRIND :IF-MATCH NIL :DEFS NIL :REWRITES ("subset?" "member" "adh")) (("" (INST? -5) (("" (SKOSIMP) (("" (INST? -4) (("" (INST? 1) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|adherence_subset2| "" (EXPAND "subset?" 1 2) (("" (EXPAND "member") (("" (SKOSIMP*) (("" (FORWARD-CHAIN "adherence_subset1") NIL NIL)) NIL)) NIL)) NIL) (|adherence_prop1| "" (SKOLEM-TYPEPRED) (("" (EXPAND "adh") (("" (INST?) NIL NIL)) NIL)) NIL) (|adherence_prop2| "" (SKOLEM!) (("" (USE "adherence_prop1" ("e" "min(e1!1, e2!1)" "E" "E!1")) (("" (SKOSIMP) (("" (INST?) (("" (GROUND) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_unicity| "" (GRIND :EXCLUDE ("abs" "adh") :IF-MATCH NIL) (("" (DELETE -1 -2 -3 -4) (("" (REWRITE "null_distance") (("" (NAME "eps" "abs(l1!1 - l2!1)") (("" (ASSERT) (("" (INST -2 "eps/2") (("" (INST -3 "eps/2") (("" (SKOSIMP*) (("" (LEMMA "adherence_prop2" ("E" "E!1" "e1" "delta!1" "e2" "delta!2" "a" "a!1")) (("" (SKOSIMP) (("" (INST?) (("" (INST?) (("" (ASSERT) (("" (DELETE -2 -3 1) (("" (USE "triangle2" ("y" "l2!1" "b" "eps/2")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|subset_convergence| "" (GRIND :EXCLUDE ("abs" "adh") :IF-MATCH NIL) (("" (INST? -7) (("" (SKOLEM!) (("" (INST 1 "delta!1") (("" (SKOSIMP) (("" (INST? -5) (("" (INST?) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|subset_convergence2| "" (SKOSIMP) (("" (FORWARD-CHAIN "subset_convergence") (("" (INST?) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) (|convergence_in_domain| "" (GRIND :EXCLUDE ("abs" "adh") :IF-MATCH NIL) (("" (REWRITE "null_distance") (("" (ASSERT) (("" (INST -5 "abs(l!1 - f!1(x!1))") (("" (SKOLEM!) (("" (INST?) (("" (ASSERT) (("" (REWRITE "null_abs2") (("" (ASSERT) (("" (REWRITE "diff_abs_commute" -) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_sum| "" (GRIND :EXCLUDE ("abs" "adh") :IF-MATCH NIL) (("" (DELETE -1 -2 -3 -4 -5 -6) (("" (INST -1 "epsilon!1/2") (("" (INST -2 "epsilon!1/2") (("" (SKOSIMP*) (("" (INST 1 "min(delta!1, delta!2)") (("" (SKOSIMP) (("" (INST?) (("" (INST?) (("" (ASSERT) (("" (LEMMA "sum_abs" ("x" "f1!1(x!1) - l1!1" "y" "f2!1(x!1) - l2!1")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_opposite| "" (GRIND :IF-MATCH NIL :EXCLUDE ("abs" "adh")) (("" (DELETE -1 -2 -3 -4 -5) (("" (INST -1 "epsilon!1") (("" (SKOLEM!) (("" (INST 1 "delta!1") (("" (SKOSIMP) (("" (INST?) (("" (ASSERT) (("" (LEMMA "neg_abs" ("x" "f1!1(x!1) - l1!1")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_diff| "" (SKOSIMP) (("" (REWRITE "diff_function") (("" (USE "convergence_sum" ("f2" "-f2!1" "l2" "-l2!1")) (("" (ASSERT) (("" (REWRITE "convergence_opposite") NIL NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_prod| "" (GRIND :EXCLUDE ("abs" "adh") :IF-MATCH NIL) (("" (DELETE -1 -2 -3 -4 -5 -6) (("" (LEMMA "prod_epsilon" ("y1" "l1!1" "y2" "l2!1" "e" "epsilon!1")) (("" (SKOLEM!) (("" (INST -2 "e1!1") (("" (INST -3 "e2!1") (("" (SKOSIMP*) (("" (INST 1 "min(delta!1, delta!2)") (("" (SKOSIMP) (("" (INST?) (("" (INST?) (("" (ASSERT) (("" (LEMMA "prod_bound") (("" (INST -1 "e1!1" "e2!1" "f1!1(x!1)" "f2!1(x!1)" "l1!1" "l2!1") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_const| "" (GRIND) NIL NIL) (|convergence_scal| "" (SKOSIMP) (("" (REWRITE "scal_function") (("" (REWRITE "convergence_prod") (("" (REWRITE "convergence_const") (("" (EXPAND "convergence" -) (("" (PROPAX) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_inv| "" (GRIND :IF-MATCH NIL :EXCLUDE ("abs" "adh")) (("" (DELETE -1 -2 -3 -4 -5) (("" (LEMMA "inv_epsilon" ("y1" "l1!1" "e" "epsilon!1")) (("" (ASSERT) (("" (SKOSIMP) (("" (INST? -3) (("" (SKOLEM!) (("" (INST 2 "delta!1") (("" (SKOSIMP) (("" (INST?) (("" (ASSERT) (("" (LEMMA "inv_bound" ("e1" "e1!1" "x1" "g!1(x!1)" "y1" "l1!1")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_div| "" (SKOSIMP) (("" (REWRITE "div_function") (("" (ASSERT) (("" (USE "convergence_prod" ("l2" "1/l2!1")) (("" (ASSERT) (("" (REWRITE "convergence_inv") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_identity| "" (GRIND :EXCLUDE ("adh" "abs")) NIL NIL) (|convergence_order| "" (GRIND :EXCLUDE ("abs" "adh") :IF-MATCH NIL) (("" (DELETE -1 -2 -3 -4) (("" (CASE "l2!1 < l1!1") (("1" (NAME "eps" "(l1!1 - l2!1)/2") (("1" (ASSERT) (("1" (INST -3 "eps") (("1" (INST -4 "eps") (("1" (SKOSIMP*) (("1" (LEMMA "adherence_prop2" ("e1" "delta!1" "e2" "delta!2" "E" "E!1" "a" "a!1")) (("1" (SKOSIMP) (("1" (INST?) (("1" (INST?) (("1" (INST?) (("1" (ASSERT) (("1" (DELETE -2 -3) (("1" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) (|convergence_lower_bound| "" (SKOSIMP) (("" (USE "convergence_const" ("b" "b!1")) (("1" (USE "convergence_order" ("f2" "f!1")) (("1" (AUTO-REWRITE "const") (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (ASSERT) (("2" (EXPAND "convergence") (("2" (PROPAX) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_upper_bound| "" (SKOSIMP) (("" (USE "convergence_const" ("b" "b!1")) (("1" (USE "convergence_order" ("f1" "f!1")) (("1" (AUTO-REWRITE "const") (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (ASSERT) (("2" (EXPAND "convergence") (("2" (PROPAX) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_locally_constant| "" (GRIND :IF-MATCH NIL :EXCLUDE ("abs" "adh")) (("" (INST 1 "epsilon!1") (("" (SKOSIMP) (("" (INST?) (("" (ASSERT) (("" (EXPAND "abs") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_squeezing| "" (GRIND :EXCLUDE ("abs" "adh") :IF-MATCH NIL) (("" (DELETE -1 -2 -3 -4 -5) (("" (INST -1 "epsilon!1/2") (("" (INST -2 "epsilon!1/2") (("" (SKOSIMP*) (("" (INST 1 "min(delta!1, delta!2)") (("" (SKOSIMP) (("" (INST?) (("" (INST?) (("" (INST?) (("" (GROUND) (("" (DELETE -6) (("" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) \$\$\$limit_of_functions.pvs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Limit of a functions [T -> real] at a point a % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% limit_of_functions [ T : TYPE FROM real ] : THEORY BEGIN IMPORTING convergence_functions %------------------------------------------------ % Subtype of reals where the limit makes sense %------------------------------------------------ a, b, l, l1, l2 : VAR real c : VAR (adh[T](fullset[real])) f, f1, f2 : VAR [ T -> real] g : VAR [T -> nzreal] epsilon, delta : VAR posreal x : VAR T %--------------------------------------------------- % Convergence of f at a point a towards a limit l %--------------------------------------------------- convergence(f, a, l) : bool = convergence(f, fullset[real], a, l) convergence_def : LEMMA FORALL f, a, l : convergence(f, a, l) IFF adh[T](fullset[real])(a) AND FORALL epsilon : EXISTS delta : FORALL x : abs(x - a) < delta IMPLIES abs(f(x) - l) < epsilon adherence_fullset : LEMMA adh[T](fullset[real])(x) cv_unique : PROPOSITION convergence(f, a, l1) AND convergence(f, a, l2) IMPLIES l1 = l2 cv_in_domain : PROPOSITION convergence(f, x, l) IMPLIES l = f(x) %------------------------------------------- % convergence and operations on functions %------------------------------------------- cv_sum : PROPOSITION convergence(f1, a, l1) AND convergence(f2, a, l2) IMPLIES convergence(f1 + f2, a, l1 + l2) cv_diff : PROPOSITION convergence(f1, a, l1) AND convergence(f2, a, l2) IMPLIES convergence(f1 - f2, a, l1 - l2) cv_prod : PROPOSITION convergence(f1, a, l1) AND convergence(f2, a, l2) IMPLIES convergence(f1 * f2, a, l1 * l2) cv_const : PROPOSITION convergence(const(b), c, b) cv_scal : PROPOSITION convergence(f, a, l) IMPLIES convergence(b * f, a, b * l) cv_opp : PROPOSITION convergence(f, a, l) IMPLIES convergence(- f, a, - l) cv_div : PROPOSITION convergence(f, a, l1) AND convergence(g, a, l2) AND l2 /= 0 IMPLIES convergence(f / g, a, l1 / l2) cv_inv : PROPOSITION convergence(g, a, l) AND l /= 0 IMPLIES convergence(1 / g, a, 1 / l) cv_identity : PROPOSITION convergence(I[T], c, c) %------------------------- % f is convergent at a %------------------------- convergent(f, a) : bool = EXISTS l : convergence(f, a, l) lim(f, (x0 : {a | convergent(f, a)})) : real = epsilon(LAMBDA l : convergence(f, x0, l)) lim_fun_lemma : LEMMA FORALL f, (x0 : {a | convergent(f, a)}) : convergence(f, x0, lim(f, x0)) lim_fun_def : LEMMA FORALL f, l, (x0 : {a | convergent(f, a)}) : lim(f, x0) = l IFF convergence(f, x0, l) convergence_equiv : LEMMA convergence(f, a, l) IFF convergent(f, a) AND lim(f, a) = l convergent_in_domain : LEMMA convergent(f, x) IFF convergence(f, x, f(x)) limit_in_domain : LEMMA convergent(f, x) IMPLIES lim(f, x) = f(x) %------------------------------------------ % Operations preserving convergence at a %------------------------------------------ sum_fun_convergent : LEMMA convergent(f1, a) AND convergent(f2, a) IMPLIES convergent(f1 + f2, a) opposite_fun_convergent : LEMMA convergent(f, a) IMPLIES convergent(- f, a) diff_fun_convergent : LEMMA convergent(f1, a) AND convergent(f2, a) IMPLIES convergent(f1 - f2, a) prod_fun_convergent : LEMMA convergent(f1, a) AND convergent(f2, a) IMPLIES convergent(f1 * f2, a) const_fun_convergent : LEMMA convergent(const(b), c) scal_fun_convergent : LEMMA convergent(f, a) IMPLIES convergent(b * f, a) inv_fun_convergent : LEMMA convergent(g, a) AND lim(g, a) /= 0 IMPLIES convergent(1/g, a) div_fun_convergent : LEMMA convergent(f, a) AND convergent(g, a) AND lim(g, a) /= 0 IMPLIES convergent(f / g, a) convergent_identity : LEMMA convergent(I[T], c) %---------------------------- % Same things with lim(a) %---------------------------- limit_sum_fun : LEMMA convergent(f1, a) AND convergent(f2, a) IMPLIES lim(f1 + f2, a) = lim(f1, a) + lim(f2, a) limit_opposite_fun : LEMMA convergent(f, a) IMPLIES lim(- f, a) = - lim(f, a) limit_diff_fun : LEMMA convergent(f1, a) AND convergent(f2, a) IMPLIES lim(f1 - f2, a) = lim(f1, a) - lim(f2, a) limit_prod_fun : LEMMA convergent(f1, a) AND convergent(f2, a) IMPLIES lim(f1 * f2, a) = lim(f1, a) * lim(f2, a) limit_const_fun : LEMMA lim(const(b), c) = b limit_scal_fun : LEMMA convergent(f, a) IMPLIES lim(b * f, a) = b * lim(f, a) limit_inv_fun : LEMMA convergent(g, a) AND lim(g, a) /= 0 IMPLIES lim(1/g, a) = 1/lim(g, a) limit_div_fun : LEMMA convergent(f, a) AND convergent(g, a) AND lim(g, a) /= 0 IMPLIES lim(f / g, a) = lim(f, a)/lim(g, a) limit_identity : LEMMA lim(I[T], c) = c %-------------------- % Bounds on limits %-------------------- E : VAR setof[real] limit_le1 : LEMMA convergent(f, a) AND (FORALL x : f(x) <= b) IMPLIES lim(f, a) <= b limit_ge1 : LEMMA convergent(f, a) AND (FORALL x : f(x) >= b) IMPLIES lim(f, a) >= b limit_order1 : LEMMA convergent(f1, a) AND convergent(f2, a) AND (FORALL x : f1(x) <= f2(x)) IMPLIES lim(f1, a) <= lim(f2, a) limit_le2 : LEMMA convergent(f, a) AND adh[T](E)(a) AND (FORALL x : E(x) IMPLIES f(x) <= b) IMPLIES lim(f, a) <= b limit_ge2 : LEMMA convergent(f, a) AND adh[T](E)(a) AND (FORALL x : E(x) IMPLIES f(x) >= b) IMPLIES lim(f, a) >= b limit_order2: LEMMA convergent(f1, a) AND convergent(f2, a) AND adh[T](E)(a) AND (FORALL x : E(x) IMPLIES f1(x) <= f2(x)) IMPLIES lim(f1, a) <= lim(f2, a) END limit_of_functions \$\$\$limit_of_functions.prf (|limit_of_functions| (|convergence_def| "" (EXPAND "convergence") (("" (EXPAND "convergence") (("" (EXPAND "fullset") (("" (PROPAX) NIL NIL)) NIL)) NIL)) NIL) (|adherence_fullset| "" (AUTO-REWRITE "fullset" "member_adherent[T]") (("" (SKOLEM!) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|cv_unique| "" (SKOSIMP) (("" (EXPAND "convergence") (("" (USE "convergence_unicity[T]") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) (|cv_in_domain| "" (SKOSIMP) (("" (EXPAND "convergence") (("" (USE "convergence_in_domain[T]") (("" (EXPAND "fullset") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|cv_sum| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_sum[T]") NIL NIL)) NIL) (|cv_diff| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_diff[T]") NIL NIL)) NIL) (|cv_prod| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_prod[T]") NIL NIL)) NIL) (|cv_const| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_const[T]") NIL NIL)) NIL) (|cv_scal| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_scal[T]") NIL NIL)) NIL) (|cv_opp| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_opposite[T]") NIL NIL)) NIL) (|cv_div| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_div[T]") NIL NIL)) NIL) (|cv_inv| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_inv[T]") NIL NIL)) NIL) (|cv_identity| "" (EXPAND "convergence") (("" (GRIND :DEFS NIL :REWRITES "convergence_identity[T]") NIL NIL)) NIL) (|lim_fun_lemma| "" (SKOLEM!) (("" (NAME-REPLACE "ll" "lim(f!1, x0!1)" :HIDE? NIL) (("" (EXPAND "lim" -) (("" (LEMMA "epsilon_ax" ("p" "LAMBDA (l: real): convergence(f!1, x0!1, l)")) (("" (ASSERT) (("" (TYPEPRED "x0!1") (("" (EXPAND "convergent") (("" (PROPAX) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|lim_fun_def| "" (SKOLEM!) (("" (USE "lim_fun_lemma") (("" (GROUND) (("" (USE "cv_unique" ("l2" "lim(f!1, x0!1)")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|convergence_equiv| "" (SKOLEM!) (("" (PROP) (("1" (EXPAND "convergent") (("1" (INST?) NIL NIL)) NIL) ("2" (REWRITE "lim_fun_def") (("2" (EXPAND "convergent") (("2" (INST?) NIL NIL)) NIL)) NIL) ("3" (REWRITE "lim_fun_def") NIL NIL)) NIL)) NIL) (|convergent_in_domain| "" (GRIND :EXCLUDE "convergence") (("" (FORWARD-CHAIN "cv_in_domain") (("" (ASSERT) NIL NIL)) NIL)) NIL) (|limit_in_domain| "" (SKOSIMP) (("" (REWRITE "lim_fun_def") (("" (REWRITE "convergent_in_domain") NIL NIL)) NIL)) NIL) (|sum_fun_convergent| "" (EXPAND "convergent") (("" (SKOSIMP*) (("" (INST 1 "l!1 + l!2") (("" (REWRITE "cv_sum") NIL NIL)) NIL)) NIL)) NIL) (|opposite_fun_convergent| "" (EXPAND "convergent") (("" (SKOSIMP*) (("" (FORWARD-CHAIN "cv_opp") (("" (INST?) NIL NIL)) NIL)) NIL)) NIL) (|diff_fun_convergent| "" (EXPAND "convergent") (("" (SKOSIMP*) (("" (INST 1 "l!1 - l!2") (("" (REWRITE "cv_diff") NIL NIL)) NIL)) NIL)) NIL) (|prod_fun_convergent| "" (EXPAND "convergent") (("" (SKOSIMP*) (("" (INST 1 "l!1 * l!2") (("" (REWRITE "cv_prod") NIL NIL)) NIL)) NIL)) NIL) (|const_fun_convergent| "" (EXPAND "convergent") (("" (SKOLEM!) (("" (INST?) (("" (REWRITE "cv_const") NIL NIL)) NIL)) NIL)) NIL) (|scal_fun_convergent| "" (EXPAND "convergent") (("" (SKOSIMP*) (("" (INST 1 "b!1 * l!1") (("" (REWRITE "cv_scal") NIL NIL)) NIL)) NIL)) NIL) (|inv_fun_convergent| "" (SKOSIMP) (("" (REWRITE "lim_fun_def") (("" (EXPAND "convergent") (("" (SKOSIMP) (("" (ASSERT) (("" (INST 2 "1/l!1") (("" (REWRITE "cv_inv") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|div_fun_convergent| "" (SKOSIMP) (("" (REWRITE "lim_fun_def") (("" (EXPAND "convergent") (("" (SKOSIMP*) (("" (ASSERT) (("" (INST 2 "l!1 / l!2") (("" (REWRITE "cv_div") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|convergent_identity| "" (SKOLEM!) (("" (EXPAND "convergent") (("" (USE "cv_identity") (("" (INST?) NIL NIL)) NIL)) NIL)) NIL) (|limit_sum_fun_TCC1| "" (SKOSIMP) (("" (REWRITE "sum_fun_convergent") NIL NIL)) NIL) (|limit_sum_fun| "" (AUTO-REWRITE "lim_fun_lemma" "lim_fun_def" "sum_fun_convergent" ("cv_sum")) (("" (SKOSIMP) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|limit_opposite_fun_TCC1| "" (LEMMA "opposite_fun_convergent") (("" (PROPAX) NIL NIL)) NIL) (|limit_opposite_fun| "" (AUTO-REWRITE "lim_fun_lemma" "lim_fun_def" "opposite_fun_convergent" ("cv_opp")) (("" (SKOSIMP) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|limit_diff_fun_TCC1| "" (SKOSIMP) (("" (REWRITE "diff_fun_convergent") NIL NIL)) NIL) (|limit_diff_fun| "" (AUTO-REWRITE "lim_fun_lemma" "lim_fun_def" "diff_fun_convergent" ("cv_diff")) (("" (SKOSIMP) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|limit_prod_fun_TCC1| "" (SKOSIMP) (("" (REWRITE "prod_fun_convergent") NIL NIL)) NIL) (|limit_prod_fun| "" (AUTO-REWRITE "lim_fun_lemma" "lim_fun_def" "prod_fun_convergent" ("cv_prod")) (("" (SKOSIMP) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|limit_const_fun_TCC1| "" (LEMMA "const_fun_convergent") (("" (PROPAX) NIL NIL)) NIL) (|limit_const_fun| "" (AUTO-REWRITE "lim_fun_lemma" "lim_fun_def" "const_fun_convergent" ("cv_const")) (("" (SKOSIMP) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|limit_scal_fun_TCC1| "" (LEMMA "scal_fun_convergent") (("" (PROPAX) NIL NIL)) NIL) (|limit_scal_fun| "" (AUTO-REWRITE "lim_fun_lemma" "lim_fun_def" "scal_fun_convergent" "cv_scal") (("" (SKOSIMP) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|limit_inv_fun_TCC1| "" (SKOSIMP) (("" (REWRITE "inv_fun_convergent") NIL NIL)) NIL) (|limit_inv_fun| "" (SKOSIMP) (("" (ASSERT) (("" (DELETE 1) (("" (AUTO-REWRITE "lim_fun_def" "lim_fun_lemma" "inv_fun_convergent" ("cv_inv")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|limit_div_fun_TCC1| "" (SKOSIMP) (("" (REWRITE "div_fun_convergent") NIL NIL)) NIL) (|limit_div_fun| "" (SKOSIMP) (("" (ASSERT) (("" (DELETE 1) (("" (AUTO-REWRITE "lim_fun_def" "lim_fun_lemma" "div_fun_convergent" "cv_div") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|limit_identity_TCC1| "" (LEMMA "convergent_identity") (("" (PROPAX) NIL NIL)) NIL) (|limit_identity| "" (AUTO-REWRITE "lim_fun_lemma" "lim_fun_def" "convergent_identity" "cv_identity") (("" (SKOLEM!) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|limit_le1| "" (SKOSIMP) (("" (ASSERT) (("" (NAME-REPLACE "ll" "lim(f!1, a!1)" :HIDE? NIL) (("" (REWRITE "lim_fun_def") (("" (EXPAND "convergence") (("" (USE "convergence_upper_bound[T]") (("" (GROUND) (("" (DELETE -1 -2 2) (("" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_ge1| "" (SKOSIMP) (("" (ASSERT) (("" (NAME-REPLACE "ll" "lim(f!1, a!1)" :HIDE? NIL) (("" (REWRITE "lim_fun_def") (("" (EXPAND "convergence") (("" (USE "convergence_lower_bound[T]" ("b" "b!1")) (("" (GROUND) (("" (DELETE -1 -2 2) (("" (GRIND :IF-MATCH NIL) (("" (INST?) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_order1| "" (SKOSIMP) (("" (ASSERT) (("" (NAME-REPLACE "ll1" "lim(f1!1, a!1)" :HIDE? NIL) (("" (NAME-REPLACE "ll2" "lim(f2!1, a!1)" :HIDE? NIL) (("" (REWRITE "lim_fun_def") (("" (REWRITE "lim_fun_def") (("" (EXPAND "convergence") (("" (USE "convergence_order[T]" ("l1" "ll1" "l2" "ll2")) (("" (GROUND) (("" (EXPAND "fullset" +) (("" (PROPAX) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_le2| "" (SKOSIMP) (("" (ASSERT) (("" (NAME-REPLACE "ll" "lim(f!1, a!1)" :HIDE? NIL) (("" (REWRITE "lim_fun_def") (("" (EXPAND "convergence") (("" (USE "subset_convergence2[T]" ("E1" "E!1")) (("" (GROUND) (("1" (DELETE -2 -3) (("1" (USE "convergence_upper_bound[T]") (("1" (ASSERT) NIL NIL)) NIL)) NIL) ("2" (REWRITE "subset_fullset") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_ge2| "" (SKOSIMP) (("" (ASSERT) (("" (NAME-REPLACE "ll" "lim(f!1, a!1)" :HIDE? NIL) (("" (REWRITE "lim_fun_def") (("" (EXPAND "convergence") (("" (USE "subset_convergence2[T]" ("E1" "E!1")) (("" (GROUND) (("1" (DELETE -2 -3) (("1" (USE "convergence_lower_bound[T]" ("b" "b!1")) (("1" (GROUND) (("1" (DELETE -1 -2 2) (("1" (SKOSIMP) (("1" (INST?) (("1" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (REWRITE "subset_fullset") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|limit_order2| "" (SKOSIMP) (("" (ASSERT) (("" (NAME-REPLACE "ll1" "lim(f1!1, a!1)" :HIDE? NIL) (("" (NAME-REPLACE "ll2" "lim(f2!1, a!1)" :HIDE? NIL) (("" (REWRITE "lim_fun_def") (("" (REWRITE "lim_fun_def") (("" (EXPAND "convergence") (("" (USE "subset_convergence2[T]" ("E1" "E!1")) (("" (USE "subset_convergence2[T]" ("E1" "E!1" "f" "f1!1")) (("" (REWRITE "subset_fullset") (("" (GROUND) (("" (DELETE -3 -4 -5 -6) (("" (FORWARD-CHAIN "convergence_order[T]") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) \$\$\$derivatives.pvs derivatives [ T : TYPE FROM real ] : THEORY BEGIN ASSUMING connected_domain : ASSUMPTION FORALL (x, y : T), (z : real) : x <= z AND z <= y IMPLIES T_pred(z) not_one_element : ASSUMPTION FORALL (x : T) : EXISTS (y : T) : x /= y ENDASSUMING IMPORTING limit_of_functions, continuous_functions f, f1, f2 : VAR [T -> real] g : VAR [T -> nzreal] x : VAR T u : VAR nzreal b : VAR real l, l1, l2 : VAR real %------------------- % Newton Quotient %------------------- A(x) : setof[nzreal] = { u | T_pred(x + u) } NQ(f, x)(h : (A(x))) : real = (f(x + h) - f(x)) / h deriv_TCC : LEMMA FORALL x : adh[(A(x))](fullset[real])(0) %---------------------------- % Differentiable functions %---------------------------- derivable(f, x) : bool = convergent(NQ(f, x), 0) derivable(f) : bool = FORALL x : derivable(f, x) %-------------------------------------- % Derivable functions are continuous %-------------------------------------- continuous_lim : LEMMA convergence(LAMBDA (h : (A(x))) : f(x + h), 0, f(x)) IFF continuous(f, x) deriv_continuous : LEMMA convergence(NQ(f, x), 0, l) IMPLIES continuous(f, x) derivable_continuous : PROPOSITION derivable(f, x) IMPLIES continuous(f, x) derivable_continuous2 : PROPOSITION derivable(f) IMPLIES continuous(f) %--------------------- % Properties of NQ %--------------------- sum_NQ : LEMMA NQ(f1 + f2, x) = NQ(f1, x) + NQ(f2, x) opposite_NQ : LEMMA NQ(- f, x) = - NQ(f, x) diff_NQ : LEMMA NQ(f1 - f2, x) = NQ(f1, x) - NQ(f2, x) scal_NQ : LEMMA NQ(b * f, x) = b * NQ(f, x) const_NQ : LEMMA NQ(const(b), x) = const(0) identity_NQ : LEMMA NQ(I[T], x) = const(1) prod_NQ : LEMMA FORALL (h : (A(x))): NQ(f1 * f2, x)(h) = NQ(f1, x)(h) * f2(x) + NQ(f2, x)(h) * f1(x + h) limit_prod_NQ : LEMMA convergence(NQ(f1, x), 0, l1) AND convergence(NQ(f2, x), 0, l2) IMPLIES convergence(NQ(f1 * f2, x), 0, f2(x) * l1 + f1(x) * l2) inv_NQ : LEMMA FORALL (h : (A(x))) : NQ(1/g, x)(h) = - NQ(g, x)(h) / (g(x) * g(x + h)) limit_inv_NQ : LEMMA convergence(NQ(g, x), 0, l1) IMPLIES convergence(NQ(1/g, x), 0, - l1 / (g(x) * g(x))) %--------------------------------------- % Operations preserving derivability %--------------------------------------- sum_derivable : LEMMA derivable(f1, x) AND derivable(f2, x) IMPLIES derivable(f1 + f2, x) opposite_derivable : LEMMA derivable(f, x) IMPLIES derivable(- f, x) diff_derivable : LEMMA derivable(f1, x) AND derivable(f2, x) IMPLIES derivable(f1 - f2, x) prod_derivable : LEMMA derivable(f1, x) AND derivable(f2, x) IMPLIES derivable(f1 * f2, x) scal_derivable : LEMMA derivable(f, x) IMPLIES derivable(b * f, x) const_derivable : LEMMA derivable(const(b), x) inv_derivable : LEMMA derivable(g, x) IMPLIES derivable(1/g, x) div_derivable : LEMMA derivable(f, x) AND derivable(g, x) IMPLIES derivable(f / g, x) identity_derivable : LEMMA derivable(I, x) sum_derivable2 : LEMMA derivable(f1) AND derivable(f2) IMPLIES derivable(f1 + f2) opposite_derivable2 : LEMMA derivable(f) IMPLIES derivable(- f) diff_derivable2 : LEMMA derivable(f1) AND derivable(f2) IMPLIES derivable(f1 - f2) prod_derivable2 : LEMMA derivable(f1) AND derivable(f2) IMPLIES derivable(f1 * f2) scal_derivable2 : LEMMA derivable(f) IMPLIES derivable(b * f) const_derivable2 : LEMMA derivable(const(b)) inv_derivable2 : LEMMA derivable(g) IMPLIES derivable(1/g) div_derivable2 : LEMMA derivable(f) AND derivable(g) IMPLIES derivable(f / g) identity_derivable2 : LEMMA derivable(I) %-------------- % Derivative %-------------- deriv(f, (x0 : { x | derivable(f, x) })) : real = lim(NQ(f, x0), 0) deriv_sum : LEMMA derivable(f1, x) AND derivable(f2, x) IMPLIES deriv(f1 + f2, x) = deriv(f1, x) + deriv(f2, x) deriv_opposite : LEMMA derivable(f, x) IMPLIES deriv(- f, x) = - deriv(f, x) deriv_diff : LEMMA derivable(f1, x) AND derivable(f2, x) IMPLIES deriv(f1 - f2, x) = deriv(f1, x) - deriv(f2, x) deriv_prod : LEMMA derivable(f1, x) AND derivable(f2, x) IMPLIES deriv(f1 * f2, x) = deriv(f1, x) * f2(x) + deriv(f2, x) * f1(x) deriv_const : LEMMA deriv(const(b), x) = 0 deriv_scal : LEMMA derivable(f, x) IMPLIES deriv(b * f, x) = b * deriv(f, x) deriv_inv : LEMMA derivable(g, x) IMPLIES deriv(1/g, x) = - deriv(g, x) / (g(x) * g(x)) deriv_div : LEMMA derivable(f, x) AND derivable(g, x) IMPLIES deriv(f / g, x) = (deriv(f, x) * g(x) - deriv(g, x) * f(x)) / (g(x) * g(x)) deriv_identity : LEMMA deriv(I[T], x) = 1 %----------------------------------- % Type of derivable functions %----------------------------------- deriv_fun : TYPE = { f | derivable(f) } nz_deriv_fun : TYPE = { g | derivable(g) } ff, ff1, ff2 : VAR deriv_fun gg : VAR nz_deriv_fun derivable_cont: JUDGEMENT deriv_fun SUBTYPE_OF continuous_fun[T] nz_derivable_cont: JUDGEMENT nz_deriv_fun SUBTYPE_OF nz_continuous_fun[T] derivable_sum: JUDGEMENT +(ff1, ff2) HAS_TYPE deriv_fun derivable_diff: JUDGEMENT -(ff1, ff2) HAS_TYPE deriv_fun derivable_prod: JUDGEMENT *(ff1, ff2) HAS_TYPE deriv_fun derivable_scal: JUDGEMENT *(b, ff) HAS_TYPE deriv_fun derivable_opp: JUDGEMENT -(ff) HAS_TYPE deriv_fun derivable_div: JUDGEMENT /(ff, gg) HAS_TYPE deriv_fun derivable_inv: JUDGEMENT /(b, gg) HAS_TYPE deriv_fun derivable_const: JUDGEMENT const(b) HAS_TYPE deriv_fun derivable_id: JUDGEMENT I[T] HAS_TYPE deriv_fun %------------------------ % Derivative function %------------------------ deriv(ff) : [T -> real] = LAMBDA x : deriv(ff, x) deriv_sum_fun : LEMMA deriv(ff1 + ff2) = deriv(ff1) + deriv(ff2) deriv_opp_fun : LEMMA deriv(- ff) = - deriv(ff) deriv_diff_fun : LEMMA deriv(ff1 - ff2) = deriv(ff1) - deriv(ff2) deriv_prod_fun : LEMMA deriv(ff1 * ff2) = deriv(ff1) * ff2 + deriv(ff2) * ff1 deriv_scal_fun : LEMMA deriv(b * ff) = b * deriv(ff) deriv_inv_fun : LEMMA deriv(1 / gg) = - deriv(gg) / (gg * gg) deriv_scaldiv_fun : LEMMA deriv(b / gg) = - (b * deriv(gg)) / (gg * gg) deriv_div_fun : LEMMA deriv(ff / gg) = (deriv(ff) * gg - deriv(gg) * ff) / (gg * gg) deriv_const_fun : LEMMA deriv(const(b)) = const(0) deriv_id_fun : LEMMA deriv(I) = const(1) END derivatives \$\$\$derivatives.prf (|derivatives| (NQ_TCC1 "" (GRIND) NIL NIL) (|deriv_TCC| "" (AUTO-REWRITE "A") (("" (SKOLEM!) (("" (EXPAND "adh") (("" (EXPAND "fullset") (("" (LEMMA "not_one_element" ("x" "x!1")) (("" (SKOSIMP*) (("" (CASE "abs(y!1 - x!1) < e!1") (("1" (INST? 2) (("1" (ASSERT) NIL NIL)) NIL) ("2" (INST 3 "if x!1 < y!1 then e!1/2 else -e!1/2 endif") (("1" (GRIND) NIL NIL) ("2" (USE "connected_domain" ("x" "y!1" "y" "x!1")) (("2" (GRIND) NIL NIL)) NIL) ("3" (USE "connected_domain" ("x" "x!1" "y" "y!1")) (("3" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|continuous_lim| "" (GRIND :EXCLUDE ("abs" "adh") :REWRITES ("deriv_TCC" "adherence_fullset[T]") :IF-MATCH NIL) (("1" (INST? -4) (("1" (SKOLEM!) (("1" (INST + "delta!1") (("1" (SKOSIMP) (("1" (INST - "x!2 - x!1") (("1" (ASSERT) NIL NIL) ("2" (DELETE -5) (("2" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (INST? -4) (("2" (SKOLEM!) (("2" (INST + "delta!1") (("2" (SKOSIMP :PREDS? T) (("2" (ASSERT) (("2" (INST?) (("2" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_continuous| "" (SKOSIMP) (("" (REWRITE "continuous_lim" :DIR RL) (("" (CASE-REPLACE "(LAMBDA (h: (A(x!1))): f!1(h + x!1)) = const(f!1(x!1)) + I[(A(x!1))] * NQ(f!1, x!1)") (("1" (DELETE -1) (("1" (AUTO-REWRITE-THEORY "limit_of_functions[(A(x!1))]" :EXCLUDE ("convergence" "convergence_def" "convergent" "lim" "lim_fun_lemma" "lim_fun_def") :ALWAYS? T) (("1" (AUTO-REWRITE "deriv_TCC") (("1" (GRIND :DEFS NIL) NIL NIL)) NIL)) NIL)) NIL) ("2" (DELETE -1 2) (("2" (APPLY-EXTENSIONALITY :HIDE? T) (("1" (GRIND) NIL NIL) ("2" (GRIND) NIL NIL)) NIL)) NIL) ("3" (DELETE -1 2) (("3" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|derivable_continuous| "" (EXPAND "derivable") (("" (EXPAND "convergent") (("" (SKOSIMP*) (("" (FORWARD-CHAIN "deriv_continuous") NIL NIL)) NIL)) NIL)) NIL) (|derivable_continuous2| "" (EXPAND "derivable") (("" (EXPAND "continuous") (("" (GRIND :DEFS NIL :REWRITES "derivable_continuous") NIL NIL)) NIL)) NIL) (|sum_NQ| "" (SKOLEM!) (("" (APPLY-EXTENSIONALITY) (("" (GRIND) NIL NIL)) NIL)) NIL) (|opposite_NQ| "" (SKOLEM!) (("" (APPLY-EXTENSIONALITY) (("" (GRIND) NIL NIL)) NIL)) NIL) (|diff_NQ| "" (SKOLEM!) (("" (APPLY-EXTENSIONALITY) (("" (GRIND) NIL NIL)) NIL)) NIL) (|scal_NQ| "" (SKOLEM!) (("" (APPLY-EXTENSIONALITY) (("" (GRIND) NIL NIL)) NIL)) NIL) (|const_NQ| "" (SKOLEM!) (("" (APPLY-EXTENSIONALITY) (("" (GRIND) NIL NIL)) NIL)) NIL) (|identity_NQ| "" (SKOLEM!) (("" (APPLY-EXTENSIONALITY) (("" (GRIND) NIL NIL)) NIL)) NIL) (|prod_NQ| "" (GRIND) NIL NIL) (|limit_prod_NQ| "" (AUTO-REWRITE "deriv_TCC") (("" (SKOSIMP) (("" (NAME "F" "LAMBDA (h : (A(x!1))) : f1!1(x!1 + h)") (("1" (CASE-REPLACE "NQ(f1!1 * f2!1, x!1) = f2!1(x!1) * NQ(f1!1, x!1) + F * NQ(f2!1, x!1)") (("1" (AUTO-REWRITE-THEORY "limit_of_functions[(A(x!1))]" :EXCLUDE ("convergence" "convergence_def" "convergent" "lim" "lim_fun_def") :ALWAYS? T) (("1" (FORWARD-CHAIN "deriv_continuous" -3) (("1" (USE "continuous_lim") (("1" (REPLACE*) (("1" (GRIND :DEFS NIL) NIL NIL)) NIL)) NIL)) NIL)) NIL) ("2" (REPLACE -1 + RL) (("2" (DELETE -1 -2 -3 2) (("2" (APPLY-EXTENSIONALITY :HIDE? T) (("1" (GRIND) NIL NIL) ("2" (DELETE 2) (("2" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (DELETE -1 -2 2) (("2" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|inv_NQ| "" (GRIND) NIL NIL) (|limit_inv_NQ| "" (AUTO-REWRITE "deriv_TCC") (("" (SKOSIMP) (("" (NAME "F" "LAMBDA (h : (A(x!1))) : g!1(x!1 + h)") (("1" (CASE-REPLACE "NQ(1/g!1, x!1) = - NQ(g!1, x!1) / (g!1(x!1) * F)") (("1" (REWRITE "cv_div[(A(x!1))]") (("1" (REWRITE "cv_opp[(A(x!1))]") NIL NIL) ("2" (REWRITE "cv_scal[(A(x!1))]") (("2" (USE "continuous_lim" ("f" "g!1")) (("2" (GROUND) (("2" (FORWARD-CHAIN "deriv_continuous") NIL NIL)) NIL)) NIL)) NIL) ("3" (REPLACE -2 1 RL) (("3" (DELETE -1 -2 -3 2) (("3" (GRIND :REWRITES "zero_times3") NIL NIL)) NIL)) NIL)) NIL) ("2" (REPLACE -1 + RL) (("2" (DELETE -1 -2 2) (("2" (APPLY-EXTENSIONALITY :HIDE? T) (("1" (GRIND) NIL NIL) ("2" (DELETE 2) (("2" (GRIND :REWRITES "zero_times3") NIL NIL)) NIL) ("3" (DELETE 2) (("3" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL) ("3" (REPLACE -1 + RL) (("3" (DELETE -1 -2 2) (("3" (GRIND :REWRITES "zero_times3") NIL NIL)) NIL)) NIL)) NIL) ("2" (DELETE -1 2) (("2" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|sum_derivable| "" (AUTO-REWRITE "derivable" "sum_NQ" "deriv_TCC") (("" (SKOSIMP) (("" (ASSERT) (("" (USE "sum_fun_convergent[(A(x!1))]") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|opposite_derivable| "" (AUTO-REWRITE "derivable" "opposite_NQ" "deriv_TCC") (("" (SKOSIMP) (("" (ASSERT) (("" (USE "opposite_fun_convergent[(A(x!1))]") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|diff_derivable| "" (AUTO-REWRITE "derivable" "diff_NQ" "deriv_TCC") (("" (SKOSIMP) (("" (ASSERT) (("" (USE "diff_fun_convergent[(A(x!1))]") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|prod_derivable| "" (EXPAND "derivable") (("" (EXPAND "convergent") (("" (SKOSIMP*) (("" (USE "limit_prod_NQ") (("" (ASSERT) (("" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|scal_derivable| "" (AUTO-REWRITE "derivable" "scal_NQ" "deriv_TCC") (("" (SKOSIMP) (("" (ASSERT) (("" (USE "scal_fun_convergent[(A(x!1))]") (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|const_derivable| "" (SKOLEM!) (("" (AUTO-REWRITE "derivable" "const_NQ" "deriv_TCC") (("" (ASSERT) (("" (LEMMA "const_fun_convergent[(A(x!1))]") (("" (INST - "0" "0") NIL NIL)) NIL)) NIL)) NIL)) NIL) (|inv_derivable| "" (EXPAND "derivable") (("" (EXPAND "convergent") (("" (SKOSIMP*) (("" (USE "limit_inv_NQ") (("" (ASSERT) (("" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|div_derivable| "" (SKOSIMP) (("" (REWRITE "div_function[T]") (("" (REWRITE "prod_derivable") (("" (REWRITE "inv_derivable") NIL NIL)) NIL)) NIL)) NIL) (|identity_derivable| "" (SKOLEM!) (("" (AUTO-REWRITE "derivable" "identity_NQ" "deriv_TCC") (("" (ASSERT) (("" (USE "const_fun_convergent[(A(x!1))]" ("b" "1" "c" "0")) NIL NIL)) NIL)) NIL)) NIL) (|sum_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "sum_derivable") NIL NIL)) NIL) (|opposite_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "opposite_derivable") NIL NIL)) NIL) (|diff_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "diff_derivable") NIL NIL)) NIL) (|prod_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "prod_derivable") NIL NIL)) NIL) (|scal_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "scal_derivable") NIL NIL)) NIL) (|const_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "const_derivable") NIL NIL)) NIL) (|inv_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "inv_derivable") NIL NIL)) NIL) (|div_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "div_derivable") NIL NIL)) NIL) (|identity_derivable2| "" (EXPAND "derivable") (("" (GRIND :DEFS NIL :REWRITES "identity_derivable") NIL NIL)) NIL) (|deriv_TCC1| "" (AUTO-REWRITE "derivable") (("" (SKOSIMP :PREDS? T) (("" (ASSERT) NIL NIL)) NIL)) NIL) (|deriv_sum_TCC1| "" (SKOSIMP) (("" (REWRITE "sum_derivable") NIL NIL)) NIL) (|deriv_sum| "" (SKOSIMP) (("" (AUTO-REWRITE "deriv_TCC" "sum_derivable" "derivable" "deriv" "sum_NQ" "limit_sum_fun[(A(x!1))]") (("" (ASSERT) NIL NIL)) NIL)) NIL) (|deriv_opposite_TCC1| "" (LEMMA "opposite_derivable") (("" (PROPAX) NIL NIL)) NIL) (|deriv_opposite| "" (SKOSIMP) (("" (AUTO-REWRITE "deriv_TCC" "opposite_derivable" "derivable" "deriv" "opposite_NQ" "limit_opposite_fun[(A(x!1))]") (("" (ASSERT) NIL NIL)) NIL)) NIL) (|deriv_diff_TCC1| "" (SKOSIMP) (("" (REWRITE "diff_derivable") NIL NIL)) NIL) (|deriv_diff| "" (SKOSIMP) (("" (AUTO-REWRITE "deriv_TCC" "diff_derivable" "derivable" "deriv" "diff_NQ" "limit_diff_fun[(A(x!1))]") (("" (ASSERT) NIL NIL)) NIL)) NIL) (|deriv_prod_TCC1| "" (SKOSIMP) (("" (REWRITE "prod_derivable") NIL NIL)) NIL) (|deriv_prod| "" (SKOSIMP) (("" (USE "prod_derivable") (("" (ASSERT) (("" (AUTO-REWRITE "deriv" "deriv_TCC" "derivable" ("lim_fun_def[(A(x!1))]" "lim_fun_lemma[(A(x!1))]")) (("" (ASSERT) (("" (USE "limit_prod_NQ" ("l1" "lim(NQ(f1!1, x!1), 0)" "l2" "lim(NQ(f2!1, x!1), 0)")) (("" (GROUND) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_const_TCC1| "" (LEMMA "const_derivable") (("" (PROPAX) NIL NIL)) NIL) (|deriv_const| "" (SKOSIMP) (("" (AUTO-REWRITE "deriv_TCC" "const_derivable" "derivable" "deriv" "const_NQ") (("" (ASSERT) (("" (USE "limit_const_fun[(A(x!1))]" ("b" "0" "c" "0")) NIL NIL)) NIL)) NIL)) NIL) (|deriv_scal_TCC1| "" (LEMMA "scal_derivable") (("" (PROPAX) NIL NIL)) NIL) (|deriv_scal| "" (SKOSIMP) (("" (AUTO-REWRITE "deriv_TCC" "scal_derivable" "derivable" "deriv" "scal_NQ" "limit_scal_fun[(A(x!1))]") (("" (ASSERT) NIL NIL)) NIL)) NIL) (|deriv_inv_TCC1| "" (LEMMA "inv_derivable") (("" (PROPAX) NIL NIL)) NIL) (|deriv_inv| "" (SKOSIMP) (("" (FORWARD-CHAIN "inv_derivable") (("" (ASSERT) (("" (AUTO-REWRITE "deriv" "deriv_TCC" "derivable" ("lim_fun_def[(A(x!1))]" "lim_fun_lemma[(A(x!1))]")) (("" (ASSERT) (("" (USE "limit_inv_NQ" ("l1" "lim(NQ(g!1, x!1), 0)")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_div_TCC1| "" (SKOSIMP) (("" (REWRITE "div_derivable") NIL NIL)) NIL) (|deriv_div| "" (GRIND :DEFS NIL :REWRITES ("inv_derivable" "deriv_inv" "deriv_prod" "div_function[T]" "/")) NIL NIL) (|deriv_identity_TCC1| "" (LEMMA "identity_derivable") (("" (PROPAX) NIL NIL)) NIL) (|deriv_identity| "" (SKOSIMP) (("" (AUTO-REWRITE "deriv_TCC" "identity_derivable" "derivable" "deriv" "identity_NQ") (("" (USE "limit_const_fun[(A(x!1))]" ("b" "1" "c" "0")) (("" (ASSERT) NIL NIL)) NIL)) NIL)) NIL) (|derivable_cont| "" (SKOLEM!) (("" (REWRITE "derivable_continuous2") NIL NIL)) NIL) (|nz_derivable_cont| "" (SKOLEM!) (("" (REWRITE "derivable_continuous2") NIL NIL)) NIL) (|derivable_sum| "" (SKOLEM!) (("" (REWRITE "sum_derivable2") NIL NIL)) NIL) (|derivable_diff| "" (SKOLEM!) (("" (REWRITE "diff_derivable2") NIL NIL)) NIL) (|derivable_prod| "" (SKOLEM!) (("" (REWRITE "prod_derivable2") NIL NIL)) NIL) (|derivable_scal| "" (SKOLEM!) (("" (REWRITE "scal_derivable2") NIL NIL)) NIL) (|derivable_opp| "" (SKOLEM!) (("" (REWRITE "opposite_derivable2") NIL NIL)) NIL) (|derivable_div| "" (SKOLEM!) (("" (REWRITE "div_derivable2") NIL NIL)) NIL) (|derivable_inv| "" (SKOLEM!) (("" (CASE-REPLACE "b!1 / gg!1 = b!1 * (1 / gg!1)") (("1" (REWRITE "scal_derivable2") (("1" (REWRITE "inv_derivable2") NIL NIL)) NIL) ("2" (DELETE 2) (("2" (APPLY-EXTENSIONALITY :HIDE? T) (("2" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|derivable_const| "" (SKOLEM!) (("" (REWRITE "const_derivable2") NIL NIL)) NIL) (|derivable_id| "" (LEMMA "identity_derivable2") (("" (PROPAX) NIL NIL)) NIL) (|deriv_TCC2| "" (AUTO-REWRITE "derivable" "deriv_TCC") (("" (SKOSIMP :PREDS? T) (("" (ASSERT) (("" (INST?) NIL NIL)) NIL)) NIL)) NIL) (|deriv_sum_fun| "" (SKOLEM-TYPEPRED) (("" (EXPAND "derivable") (("" (APPLY-EXTENSIONALITY :HIDE? T) (("" (EXPAND "+" 1 2) (("" (EXPAND "deriv") (("" (REWRITE "deriv_sum") (("1" (INST?) NIL NIL) ("2" (INST? -2) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_opp_fun| "" (SKOLEM-TYPEPRED) (("" (EXPAND "derivable") (("" (APPLY-EXTENSIONALITY :HIDE? T) (("" (EXPAND "-" 1 2) (("" (EXPAND "deriv") (("" (REWRITE "deriv_opposite") (("" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_diff_fun| "" (SKOLEM-TYPEPRED) (("" (EXPAND "derivable") (("" (APPLY-EXTENSIONALITY :HIDE? T) (("" (EXPAND "-" 1 2) (("" (EXPAND "deriv") (("" (REWRITE "deriv_diff") (("1" (INST?) NIL NIL) ("2" (INST? -2) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_prod_fun| "" (AUTO-REWRITE "*" "+") (("" (SKOLEM-TYPEPRED) (("" (EXPAND "derivable") (("" (APPLY-EXTENSIONALITY :HIDE? T) (("" (EXPAND "deriv") (("" (REWRITE "deriv_prod") (("1" (INST?) NIL NIL) ("2" (INST? -2) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_scal_fun| "" (SKOLEM-TYPEPRED) (("" (EXPAND "derivable") (("" (APPLY-EXTENSIONALITY :HIDE? T) (("" (EXPAND "*" 1 2) (("" (EXPAND "deriv") (("" (REWRITE "deriv_scal") (("" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_inv_fun_TCC1| "" (SKOSIMP) (("" (EXPAND "*") (("" (REWRITE "zero_times3") (("" (GROUND) NIL NIL)) NIL)) NIL)) NIL) (|deriv_inv_fun| "" (SKOLEM-TYPEPRED) (("" (EXPAND "derivable") (("" (APPLY-EXTENSIONALITY :HIDE? T) (("1" (EXPAND "/" 1 2) (("1" (EXPAND "-" +) (("1" (EXPAND "*" +) (("1" (EXPAND "deriv") (("1" (REWRITE "deriv_inv") (("1" (INST?) NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (DELETE -) (("2" (GRIND :REWRITES "zero_times3") NIL NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_scaldiv_fun| "" (SKOLEM!) (("" (CASE-REPLACE "b!1 / gg!1 = b!1 * (1/gg!1)") (("1" (REWRITE "deriv_scal_fun") (("1" (REWRITE "deriv_inv_fun") (("1" (DELETE -) (("1" (APPLY-EXTENSIONALITY :HIDE? T) (("1" (AUTO-REWRITE-THEORY "real_fun_ops[T]") (("1" (ASSERT) NIL NIL)) NIL) ("2" (GRIND :REWRITES "zero_times3") NIL NIL)) NIL)) NIL)) NIL)) NIL) ("2" (DELETE 2) (("2" (APPLY-EXTENSIONALITY :HIDE? T) (("2" (GRIND) NIL NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_div_fun| "" (SKOLEM-TYPEPRED) (("" (EXPAND "derivable") (("" (APPLY-EXTENSIONALITY :HIDE? T) (("1" (INST?) (("1" (INST?) (("1" (EXPAND "/" 1 2) (("1" (EXPAND "-" +) (("1" (EXPAND "*") (("1" (EXPAND "deriv") (("1" (REWRITE "deriv_div") NIL NIL)) NIL)) NIL)) NIL)) NIL)) NIL)) NIL) ("2" (DELETE -) (("2" (GRIND :REWRITES "zero_times3") NIL NIL)) NIL)) NIL)) NIL)) NIL) (|deriv_const_fun| "" (SKOLEM!) (("" (AUTO-REWRITE "deriv_const" "const_derivable" "const") (("" (EXPAND "deriv") (("" (APPLY-EXTENSIONALITY :HIDE? T) NIL NIL)) NIL)) NIL)) NIL) (|deriv_id_fun| "" (AUTO-REWRITE "I" "const" "deriv_identity" "identity_derivable") (("" (EXPAND "deriv") (("" (APPLY-EXTENSIONALITY :HIDE? T) NIL NIL)) NIL)) NIL)) \$\$\$top_derivative.pvs top_derivative : THEORY BEGIN IMPORTING derivatives, derivative_props, chain_rule END top_derivative