Formalizing Calculus without Limit Theory in Coq
Abstract
:1. Introduction
2. Related Work
3. Preliminary
3.1. Coq
Axiom classicT : ∀ P, {P} + {~P}. Axiom prop_ext : ∀ P Q, P <> Q > P = Q. Axiom fun_ext : ∀ {T1 T2 :Type} (P Q :T1 > T2), (∀ m, P m = Q m) > P = Q.
∀ {A :Type} {P :A > Prop}, (∀ a, P a ↔ Q a) → P = Q.
Axiom cid : ∀ {A :Type} {P :A > Prop}, (∃ x, P x) > { x :A  P x }. Definition Getele {A :Type} {P :A > Prop} (Q :∃ x, P x) ≔ proj1_sig (cid Q).
3.2. Real Number Theory System
Inductive Nat : Type ≔  One  Successor : Nat > Nat. Notation "1" ≔ One. Notation " x ‘ " ≔ (Successor x)(at level 0).
4. Basic Definitions and Properties
Definition RFun ≔ Real > Real.
Definition input2Mi (F :Rfun) ≔ λ u v, F(v)  F(u). Notation "F #" ≔ (input2Mi F)(at level 5).
Definition Δ :Rfun ≔ λ x, x. Definition ϕ :Real > Rfun ≔ λ C, (λ _, C).
Definition mult_fun c (f :Rfun) ≔ λ x, c · f(x). Definition multfun_ (f :Rfun) c ≔ λ x, f(c · x). Definition multfun_pl (f :Rfun) c d ≔ λ x, f(c · x + d). Definition minus_fun (f :Rfun) ≔ λ x,  f(x). Definition Plus_Fun (f g :Rfun) ≔ λ x, f(x) + g(x). Definition Minus_Fun (f g :Rfun) ≔ λ x, f(x)  g(x). Definition Mult_Fun (f g :Rfun) ≔ λ x, f(x) · g(x). Definition maxfun (f g :Rfun) ≔ λ x, match (Rcase (f x)(g x)) with  left _ => g x  right _ => f x end.
Definition fun_inc f I ≔ ∀ x y, x ∈ I > y ∈ I > x < y > f x ≤ f y. Definition fun_sinc f I ≔ ∀ x y, x ∈ I > y ∈ I > x < y > f x < f y. Definition fun_dec f I ≔ ∀ x y, x ∈ I > y ∈ I > x < y > f y ≤ f x. Definition fun_sdec f I ≔ ∀ x y, x ∈ I > y ∈ I > x < y > f x > f y. Definition convexdown f I ≔ ∀ x1 x2, x1 ∈ I > x2 ∈ I > ∀ c, c > O > c < 1 > f(c·x1+(1c)·x2) ≤ c·f(x1) + (1c)·f(x2). Definition convexup f I ≔ ∀ x1 x2, x1 ∈ I > x2 ∈ I > ∀ c, c > O > c < 1 > c·f(x1) + (1c)·f(x2) ≤ f(c·x1+(1c)·x2).
Definition fun_pinc f I ≔ (∀ z, z ∈ I > f z > O) /\ fun_inc f I. Definition unbRecF (f :Rfun) I ≔ ∀ M, ∃ z l, z ∈ I /\ M < (1/(f z)) l. Definition bound_ran f a b ≔ ∃ A, A > O /\ ∀ x, x ∈ [ab] > f x < A.
Fact fpcp1 : ∀ a b, fun_pinc Δ (Oba]. Fact fpcp2 : ∀ {d1 d2 R}, fun_pinc d1 R > fun_pinc d2 R > fun_pinc (maxfun d1 d2) R. Fact ubrp1 : ∀ {a b}, a~< b > unbRecF Δ (Oba]. Fact ubrp2 : ∀ {d1 d2 R}, fun_pinc d1 R > fun_pinc d2 R > unbRecF d1 R > unbRecF d2 R > unbRecF (maxfun d1 d2) R. Fact brp1 : ∀ {f d a b}, fun_pinc d (Oba] > (∀ x h, x ∈ [ab] > (x+h) ∈ [ab] > f(x+h)  f(x) ≤ d(h)) > bound_ran f a b.
Definition uniform_continuous f a b ≔
∃ d, fun_pinc d (Oba] /\ unbRecF d (Oba] /\
∀ x h, x ∈ [ab] > (x+h) ∈ [ab] > f(x+h)  f(x) ≤ d(h).
Fact uclt : ∀ {f a b}, uniform_continuous f a b > a < b. Fact ucbound : ∀ {f a b}, uniform_continuous f a b > bound_ran f a b.
Definition Lipschitz f a b ≔
∃ M, M > O /\ ∀ x h, x ∈ [ab] > (x+h) ∈ [ab] > f(x+h)  f(x) ≤ M·h.
Fact lipbound : ∀ {f a b}, Lipschitz f a b > bound_ran f a b.
5. Differential and Integral
5.1. DifferenceQuotient Control Function
Definition diff_quo_median F f a b ≔
∀ u v l, u ∈ [ab] > v ∈ [ab] > ∃ p q, p ∈ [uv] /\ q ∈ [uv] /\
f p ≤ ((F v  F u)/(vu))(uneqOP l) /\ ((F v  F u)/(vu))(uneqOP l) ≤ f q.
 $\mathrm{\Phi}\left(0\right)$ is the DCF of a constant function,
 $\mathrm{\Phi}\left(C\right)$ is the DCF of a linear function,
 $cf\left(x\right)$ is the DCF of $cF\left(x\right)$ on $[a,b]$,
 $f(x)$ is the DCF of $F(x)$ on $[b,a]$,
 $cf(cx+d)$ is the DCF of $F(cx+d),c>0$ on $[\frac{ad}{c},\frac{bd}{c}]$.
Fact medC : ∀ a b C, diff_quo_median (ϕ(C)) (ϕ(O)) a b. Fact medCx : ∀ a b C, diff_quo_median (λ x, C·x) (ϕ(C)) a b. Fact medfMu : ∀ {a b F f} c, diff_quo_median F f a b > diff_quo_median (mult_fun c F) (mult_fun c f) a b. Fact medf_mi : ∀ {F f a b}, diff_quo_median F f a b > diff_quo_median (λ x, F(x)) (λ x, f(x)) (b) (a). Fact medf_cd : ∀ {F f a b} c d l, diff_quo_median F f a b > diff_quo_median (multfun_pl F c d) (mult_fun c (multfun_pl f c d))(((ad)/c) (uneqOP l))(((bd)/c) (uneqOP l)).

If $f\left(x\right)\ge 0\left(f\right(x)\le 0)$ in I, then F is increasing(decreasing) in I,

If $f\left(x\right)>0\left(f\right(x)<0)$ in I, then F is strictly increasing(decreasing) in I,

If f is increasing(decreasing) in I, then F is convex down(convex up) in I.
Fact medpos_inc : ∀ F f a b, diff_quo_median F f a b > (∀ x, x ∈ [ab] > f(x) ≥ O) > fun_inc F [ab]. Fact medneg_dec : ∀ F f a b, diff_quo_median F f a b > (∀ x, x ∈ [ab] > f(x) ≤ O) > fun_dec F [ab]. Fact medpos_sinc : ∀ F f a b, diff_quo_median F f a b > (∀ x, x ∈ [ab] > f(x) > O) > fun_sinc F [ab]. Fact medneg_sdec : ∀ F f a b, diff_quo_median F f a b > (∀ x, x ∈ [ab] > f(x) < O) > fun_sdec F [ab]. Fact medconc : ∀ {F f a b}, diff_quo_median F f a b > fun_inc f [ab] > convexdown F [ab]. Fact medconv : ∀ {F f a b}, diff_quo_median F f a b > fun_dec f [ab] > convexup F [ab].
Lemma medccpre : ∀ {F f a b}, diff_quo_median F f a b >
fun_inc f [ab] > ∀ {x1 x2}, x1 < x2 > x1 ∈ [ab] > x2 ∈ [ab] >
∀ c, c > O > c < 1 > F(c·x1+(1c)·x2) ≤ c·F(x1) + (1c)·F(x2).
5.2. Uniform Derivative
Definition uni_derivative F f a b ≔ ∃ d, pos_inc d (Oba] /\ unbRecF d (Oba] /\ ∃ M, O < M /\ ∀ x h, x ∈ [ab] > (x+h) ∈ [ab] > F(x+h)  F(x)  f(x)·h ≤ M·h·d(h). Definition uni_derivability F a b ≔ ∃ f, uni_derivative F f a b.
Fact der_lt : ∀ {F f a b}, uni_derivative F f a b > a < b.
Fact dersub : ∀ {F f u v a b}, u ∈ [ab] > v ∈ [ab] > vu > O >
uni_derivative F f a b > uni_derivative F f u v.
Fact ucderf : ∀ {F f a b}, uni_derivative F f a b > uniform_continuous f a b. Fact boundderf : ∀ {F f a b}, uni_derivative F f a b > bound_ran f a b. Fact lipderF : ∀ {F f a b}, uni_derivative F f a b > Lipschitz F a b. Fact boundderF : ∀ {F f a b}, uni_derivative F f a b > bound_ran F a b.
Fact unider : ∀ {F f1 f2 a b}, uni_derivative F f1 a b >
uni_derivative F f2 a b > ∀ x, x ∈ [ab] > f1 x = f2 x.

$\mathrm{\Phi}\left(0\right)$ is the UnD of a constant function if $a<b$,

$\mathrm{\Phi}\left(C\right)$ is the UnD of a linear function if $a<b$,

$cf\left(x\right)$ is the UnD of $cF\left(x\right)$ on $[a,b]$,

$f(x)$ is the UnD of $F(x)$ on $[b,a]$,

$cf(cx+d)$ is the UnD of $F(cx+d),c>0$ on $[\frac{ad}{c},\frac{bd}{c}]$,

$f\left(x\right)+g\left(x\right)$ is the UnD of $F\left(x\right)+G\left(x\right)$ on $[a,b]$,

$f\left(x\right)g\left(x\right)$ is the UnD of $F\left(x\right)G\left(x\right)$ on $[a,b]$,

$f\left(x\right)\xb7G\left(x\right)+F\left(x\right)\xb7g\left(x\right)$ is the UnD of $F\left(x\right)\xb7G\left(x\right)$ on $[a,b]$.
Fact derC : ∀ {a b} C, a~< b > uni_derivative (ϕ(C)) (ϕ(O)) a b. Fact derCx : ∀ {a b} C, a~< b > uni_derivative (λ x, C·x) (ϕ(C)) a b. Fact derfMu : ∀ {a b F f} c, uni_derivative F f a b > uni_derivative (mult_fun c F) (mult_fun c f) a b. Fact derf_mi : ∀ {F f a b}, uni_derivative F f a b > uni_derivative (λ x, F(x)) (λ x, f(x)) (b) (a). Fact derf_cd : ∀ {F f a b} c d l, uni_derivative F f a b > uni_derivative (multfun_pl F c d) (mult_fun c (multfun_pl f c d))(((ad)/c) (uneqOP l))(((bd)/c) (uneqOP l)). Fact derFPl : ∀ {F G f g a b}, uni_derivative F f a b > uni_derivative G g a b > uni_derivative (Plus_Fun F G) (Plus_Fun f g) a b. Fact derFMi : ∀ {F G f g a b}, uni_derivative F f a b > uni_derivative G g a b > uni_derivative (Minus_Fun F G) (Minus_Fun f g) a b. Fact derFMu : ∀ {F G f g a b}, uni_derivative F f a b > uni_derivative G g a b > uni_derivative (Mult_Fun F G) (λ x, (f x)·(G x) + (F x)·(g x)) a b.
Fact derpos_inc : ∀ {F f a b}, uni_derivative F f a b > (∀ x, x ∈ [ab] > f(x) ≥ O) > fun_inc F [ab]. Fact derneg_dec : ∀ {F f a b}, uni_derivative F f a b > (∀ x, x ∈ [ab] > f(x) ≤ O) > fun_dec F [ab] Fact derpos_sinc : ∀ {F f a b}, uni_derivative F f a b > (∀ x, x ∈ [ab] > f(x) > O) > fun_sinc F [ab]. Fact derneg_sdec : ∀ {F f a b}, uni_derivative F f a b > (∀ x, x ∈ [ab] > f(x) < O) > fun_sdec F [ab].
 If $\mathrm{\Phi}\left(O\right)$ is the UnD of F on $[a,b]$, then F is the constant function on $[a,b]$.
 If f is a UnD of ${F}_{1},{F}_{2}$ on $[a,b]$, then $\forall x,y\in [a,b],{F}_{1}\#(x,y)={F}_{2}\#(x,y)$.
 Let $f,g$ be UnD of $F,G$ on $[a,b]$ and $F\left(a\right)=G\left(a\right)$. If $\forall x\in [a,b],f\left(x\right)\le g\left(x\right)$, then we have $\forall x\in [a,b],F\left(x\right)\le G\left(x\right)$.
Corollary derFC : ∀ {F a b}, uni_derivative F (ϕ(O)) a b > ∀ {x y}, x ∈ [ab] > y ∈ [ab] > F x = F y. Corollary derF2MiC : ∀ {F1 F2 f a b}, uni_derivative F1 f a b > uni_derivative F2 f a b > ∀ {x y}, x ∈ [ab] > y ∈ [ab] > F1# x y = F2# x y. Corollary derVle : ∀ {F G f g a b}, uni_derivative F f a b > uni_derivative G g a b > F a = G a > (∀ x, x ∈ [ab] > f x ≤ g x) > ∀ x, x ∈ [ab] > F x ≤ G x.
Theorem derValT :∀ {F f a b}, uni_derivative F f a b > ∃ u v, u ∈ [ab] /\
v ∈ [ab] /\ f(u)·(ba) ≤ F(b)  F(a) /\ F(b)  F(a) ≤ f(v)·(ba).
Theorem Med_der : ∀ {F f a b},
uni_derivative F f a b <> diff_quo_median F f a b /\ uniform_continuous f a b.
5.3. Strong Derivative
Definition str_derivative F f a b ≔ ∃ M, O < M /\ ∀ x h, x ∈ [ab] > (x+h) ∈ [ab] > F(x+h)  F(x)  f(x)·h ≤ M·h^2. Definition str_derivability F a b ≔ ∃ f, str_derivative F f a b.
Fact std_le : ∀ F a b, b ≤ a > ∀ f, str_derivative F f a b. Fact std_lt : ∀ {F f a b}, (a < b > str_derivative F f a b) > str_derivative F f a b.
Fact std_imply_der : ∀ {F f a b},
a < b > str_derivative F f a b > uni_derivative F f a b.
Fact lipstdf : ∀ {F f a b}, str_derivative F f a b > Lipschitz f a b. Fact boundstdf : ∀ {F f a b}, str_derivative F f a b > bound_ran f a b. Fact lipstdF : ∀ {F f a b}, str_derivative F f a b > Lipschitz F a b. Fact boundstdF : ∀ {F f a b}, str_derivative F f a b > bound_ran F a b.
Fact stdC : ∀ {a b} C, str_derivative (ϕ(C)) (ϕ(O)) a b. Fact stdCx : ∀ {a b} C, str_derivative (λ x, C·x) (ϕ(C)) a b. Fact stdfMu : ∀ {a b F f} c, str_derivative F f a b > str_derivative (mult_fun c F) (mult_fun c f) a b. Fact stdf_mi : ∀ {F f a b}, str_derivative F f a b > str_derivative (λ x, F(x)) (λ x, f(x)) (b) (a). Fact stdf_cd : ∀ {F f a b} c d l, str_derivative F f a b > str_derivative (multfun_pl F c d) (mult_fun c (multfun_pl f c d))(((ad)/c) (uneqOP l))(((bd)/c) (uneqOP l)). Fact stdFPl : ∀ {F G f g a b}, str_derivative F f a b > str_derivative G g a b > str_derivative (Plus_Fun F G) (Plus_Fun f g) a b. Fact stdFMi : ∀ {F G f g a b}, str_derivative F f a b > str_derivative G g a b > str_derivative (Minus_Fun F G) (Minus_Fun f g) a b. Fact stdFMu : ∀ {F G f g a b}, str_derivative F f a b > str_derivative G g a b > str_derivative (Mult_Fun F G) (λ x, (f x)·(G x) + (F x)·(g x)) a b.
Corollary unistd : ∀ {F f1 f2 a b}, a~< b > str_derivative F f1 a b > str_derivative F f2 a b > ∀ x, x ∈ [ab] > f1 x = f2 x. Corollary stdpos_inc : ∀ {F f a b}, str_derivative F f a b > (∀ x, x ∈ [ab] > f(x) ≥ O) > fun_inc F [ab]. Corollary stdneg_dec : ∀ {F f a b}, str_derivative F f a b > (∀ x, x ∈ [ab] > f(x) ≤ O) > fun_dec F [ab]. Corollary stdpos_sinc : ∀ {F f a b}, str_derivative F f a b > (∀ x, x ∈ [ab] > f(x) > O) > fun_sinc F [ab]. Corollary stdneg_sdec : ∀ {F f a b}, str_derivative F f a b > (∀ x, x ∈ [ab] > f(x) < O) > fun_sdec F [ab]. Corollary stdconc : ∀ {F f a b}, str_derivative F f a b > fun_inc f [ab] > convexdown F [ab]. Corollary stdconv : ∀ {F f a b}, str_derivative F f a b > fun_dec f [ab] > convexup F [ab].
Theorem Med_std : ∀ {F f a b},
str_derivative F f a b <> diff_quo_median F f a b /\ Lipschitz f a b.
5.4. Integral System and Definite Integral
Definition additivity S a b≔ ∀ u v w, u ∈ [ab] > v ∈ [ab] > w ∈ [ab] > S u v + S v w = S u w. Definition intermed S f a b ≔ ∀ u v, u ∈ [ab] > v ∈ [ab] > v > u > ∃ p q, p ∈ [uv] /\ q ∈ [uv] /\ f(p)·(vu) ≤ S u v /\ S u v ≤ f(q)·(vu). Definition integralsystem S f a b ≔ additivity S a b /\ intermed S f a^{~}b. Definition integrable S f a b ≔ ∀ S’, integralsystem S’ f a b > (∀ x y, x ∈ [ab] > y ∈ [ab] > S x y = S’ x y). Definition definiteiInt S f a b ≔ integralsystem S f a b /\ integrable S f a b. Notation " S =∫ f " ≔ (definiteiInt S f)(at level 10).
Theorem Int_med : ∀ {S f a b}, integralsystem S f a b > ∀ c, c ∈ [ab] > diff_quo_median (S c) f a b. Theorem Med_Int : ∀ {F f a b}, diff_quo_median F f a b > integralsystem F# f a b.
Theorem Int_DefInt : ∀ {S f a b}, S =∫ f a b > ∀ c, c ∈ [ab] > ∀ F, diff_quo_median F f a b > ∀ u v, u ∈ [ab] > v ∈ [ab] > (S c)# u v = F# u v. Theorem DefInt_Int : ∀ {F f a b} , diff_quo_median F f a b > (∀ F’, diff_quo_median F’ f a b > ∀ u v, u ∈ [ab] > v ∈ [ab] > F# u v = F’# u v) > F# =∫ f a b.
6. Higher Order Derivative
Fixpoint N_uni_derivative F f a b n ≔ match n with  1 => uni_derivative F f a b  p‘ => ∃ f1, uni_derivative F f1 a b /\ N_uni_derivative f1 f a b p end. Definition N_uni_derivability F a b n ≔ ∃ f, N_uni_derivative F f a b n.
Fact NderNec : ∀ {F f a b n}, N_uni_derivative F f a b n‘ > ∃ f1, N_uni_derivative F f1 a b n /\ uni_derivative f1 f a b. Fact NderSuf : ∀ {F f a b n}, (∃ f1, N_uni_derivative F f1 a b n /\ uni_derivative f1 f a b) > N_uni_derivative F f a b n‘.
Fact uniNder : ∀ {F f1 f2 a b k},
N_uni_derivative F f1 a b k > N_uni_derivative F f2 a b k >
∀ x, x ∈ [ab] > f1 x = f2 x.

${F}^{\left(n\right)}={f}_{1}$, ${f}_{1}^{\left(k\right)}={f}_{2}$, then ${F}^{(n+k)}={f}_{2}$.

${F}^{\left(n\right)}={f}_{1}$, ${F}^{(n+k)}={f}_{2}$, then ${f}_{1}^{\left(k\right)}={f}_{2}$.

${F}^{\left(n\right)}={f}_{1}$, ${F}^{(n+1)}={f}_{2}$, then ${f}_{2}$ is the UnD of ${f}_{1}$.

${F}^{\left(n\right)}={f}_{1}$ and ${f}_{2}$ is the UnD of ${f}_{1}$, then ${F}^{(n+1)}={f}_{2}$.
Fact NderOrdPl : ∀ {F f1 f2 a b n k}, N_uni_derivative F f1 a b n > N_uni_derivative f1 f2 a b k > N_uni_derivative F f2 a b (Plus_N n k). Fact NderOrdMi : ∀ {F f1 f2 a b n k}, N_uni_derivative F f1 a b n > N_uni_derivative F f2 a b (Plus_N n k) > N_uni_derivative f1 f2 a b k. Fact Nderp1 : ∀ {F f1 f2 a b n}, N_uni_derivative F f1 a b n > N_uni_derivative F f2 a b n‘ > uni_derivative f1 f2 a b. Fact Nderp2 : ∀ {F f1 f2 a b n}, N_uni_derivative F f1 a b n > uni_derivative f1 f2 a b > N_uni_derivative F f2 a b n‘.
Fact Fact_lt : ∀ {F a b k}, N_uni_derivability F a b k > a < b. Fact Nderin : ∀ {F f a b c n}, c ∈ [ab] > c < b > N_uni_derivative F f a b n > N_uni_derivative F f c b n.
Fact Nderpred : ∀ {F a b n}, N_uni_derivability F a b n‘ > N_uni_derivability F a b n. Fact Nderltn : ∀ {F a b n k}, ILT_N k n > N_uni_derivability F a b n > N_uni_derivability F a b k. Fact Nderlen : ∀ {F a b n m} l, N_uni_derivability F a b n > N_uni_derivability F a b (Minus_N n‘ m (Le_Lt l)). Definition n_th {F a b n} (H :N_uni_derivability F a b n) ≔ Getele H. Definition p_th {F a b n} (H :N_uni_derivability F a b n‘) ≔ Getele (Nderpred H). Definition k_th {F a b n} k (H :ILT_N k n) (H0 :N_uni_derivability F a b n) ≔ Getele (Nderltn H H0). Definition m_th {F a b n} k (H :ILE_N k n) (H0 :N_uni_derivability F a b n) ≔ Getele (Nderlen H H0).
Fact NderCut : ∀ {F a b n} k l1 (l :N_uni_derivability F a b n),
N_uni_derivability (k_th k l1 l) a b (Minus_N n k l1).
Fact NderfMu : ∀ {F f a b c n}, N_uni_derivative F f a b n > N_uni_derivative (mult_fun c F) (mult_fun c f) a b n. Fact NderFPl : ∀ {F f G g a b n}, N_uni_derivative F f a b n > N_uni_derivative G g a b n > N_uni_derivative (Plus_Fun F G) (Plus_Fun f g) a b n. Fact NderFMi : ∀ {F f G g a b n}, N_uni_derivative F f a b n > N_uni_derivative G g a b n > N_uni_derivative (Minus_Fun F G) (Minus_Fun f g) a b n. Fact Nderf_mi : ∀ {F f a b n}, N_uni_derivative F f a b n > N_uni_derivative (λ x, F(x)) (λ x, ((1))^n · f(x)) (b) (a) n.
7. Important Theorems in Calculus
7.1. Newton Leibniz Formula
Theorem NewtonLeibniz : ∀ {F f a b} , uni_derivative F f a b > F# =∫ f a b.
7.2. Upper LimitVariable Integral
Theorem UpLimVarInt : ∀ {S f a b},
uniform_continuous f a b > S =∫ f a b > uni_derivative (S a) f a b.
7.3. Taylor Formula
7.3.1. Taylor Lemma
 $\forall k<n,{H}^{\left(k\right)}\left(a\right)=0$ and $H\left(a\right)=0$,
 $\forall x\in [a,b],m\le {H}^{\left(n\right)}\left(x\right)\le M$.
Theorem TaylorLemma : ∀ {H a b n m M} (l :N_uni_derivability H a b n),
H a = O > (∀ k l1, (k_th k l1 l) a = O) >
(∀ x, x ∈ [ab] > m ≤ (n_th l) x) > (∀ x, x ∈ [ab] > (n_th l) x ≤ M) >
∀ x, x ∈ [ab] > m·(Rdifa ((xa)^n) n) ≤ H x /\ H x ≤ M·(Rdifa ((xa)^n) n).
Fact tlp : ∀ {m n} l, ILE_N (Minus_N n‘ m (Le_Lt l)) n. Lemma TLpre : ∀ {H a b n m M} (l :N_uni_derivability H a b n), (∀ k l1, (k_th k l1 l) a = O) > (∀ x, x ∈ [ab] > m ≤ (n_th l) x) > (∀ x, x ∈ [ab] > (n_th l) x ≤ M) > ∀ k l1 l2, let j≔(Minus_N k 1 l2) in let i≔ (Minus_N n‘ k (Le_Lt l1)) in ∀ x, x ∈ [ab] > m·(Rdifa ((xa)^j) j) ≤ (m_th i (tlp l1) l) x /\ (m_th i (tlp l1) l) x ≤ M·(Rdifa ((xa)^j) j).
7.3.2. Main Term of Taylor Formula
Fixpoint TaylorFormula_main F a b c n :N_uni_derivability F a b n > Rfun ≔ match n with  1 => λ _ _, F c  p‘ => λ l x, (p_th l c)·(Rdifa ((xc)^p) p) + TaylorFormula_main F a b c p (Nderpred l) x end.
Fact tayp1 : ∀ F a b c n l, TaylorFormula_main F a b c n l c = F c. Fact tayp2 : ∀ {F a b c n} l, c ∈ [ab] > N_uni_derivative (TaylorFormula_main F a b c n l) (ϕ(O)) a b n.
7.3.3. Derivative of Main Term of Taylor Formula
Fact Ndec : ∀ n m, {ILT_N n m} + {ILE_N m n}. Definition TFmain_kthd F a b c n k (l :N_uni_derivability F a b n) :Rfun ≔ match Ndec k n with  left l1 => TaylorFormula_main (k_th k l1 l) a b c (Minus_N n k l1) (NderCut k l1 l)  right _ => ϕ(O) end.
Fact taykdp1 : ∀ {F a b c k n l} l0, c ∈ [ab] > let m≔Minus_N n k l0 in (TFmain_kthd F a b c n‘ k l) = Plus_Fun (λ x, p_th l c · Rdifa ((xc)^m) m) (TFmain_kthd F a b c n k (Nderpred l)). Fact taykdp2 : ∀ F a b c n l, TaylorFormula_kder F a b c n‘ n l = ϕ(n_th (Nderpred l) c). Fact taykdp3 : ∀ F a b c n l k l1, c ∈ [ab] > TaylorFormula_kder F a b c n k l c = k_th k l1 l c.
Fact tayder : ∀ {F a b n} k l c, c ∈ [ab] > N_uni_derivative
(TaylorFormula_main F a b c n l) (TFmain_kthd F a b c n k l) a b k.
7.3.4. Taylor Theorem
Theorem TaylorThoerem : ∀ {F a b n l},
∀ M, (∀ x, x ∈ [ab] > (n_th l) x≤M) > ∀ c x, c ∈ [ab] > x ∈ [ab] >
F(x)(TaylorFormula_main F a b c n l x)≤ M·(Rdifa (xc^n) n).
Lemma TTpre : ∀ {F a b n M l},
(∀ x, x ∈ [ab] > (n_th l) x ≤ M) > ∀ c x, c ∈ [ab] > x ∈ [cb] >
F(x)(TaylorFormula_main F a b c n l x)≤ M·(Rdifa (xc^n) n).
8. Conclusions and Future Work
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
Appendix A
References
 Bertot, Y.; Castéran, P. Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions; Texts in Theoretical Computer Science; Springer: Berlin/Heidelberg, Germany, 2004. [Google Scholar]
 Chlipala, A. Certified Programming with Dependent Types: A Pragmatic Introduction to the Coq Proof Assistant; MIT Press: Cambridge, MA, USA, 2013. [Google Scholar]
 The Coq Development Team. The Coq Proof Assistant Reference Manual (Version 8.9.1). 2019. Available online: https://coq.inria.fr/distrib/8.9.1/refman/ (accessed on 4 August 2019).
 Nipow, T.; Paulson, L.; Wenzel, M. Isabelle/HOL: A Proof Assistant for HigherOrder Logic; Springer: Berlin/Heidelberg, Germany, 2002. [Google Scholar]
 Harrision, J. The HOL Light Theorem Prover. 2020. Available online: http://www.cl.cam.ac.uk/~jrh13/hollight/ (accessed on 18 May 2018).
 Beeson, M. Mixing computations and proofs. J. Formaliz. Reason. 2016, 9, 71–99. [Google Scholar]
 Hales, T. Formal proof. Not. Am. Math. Soc. 2008, 55, 1370–1380. [Google Scholar]
 Harrision, J. Formal proof—Theory and practice. Not. Am. Math. Soc. 2008, 55, 1395–1406. [Google Scholar]
 Wiedijk, F. Formal proof—Getting started. Not. Am. Math. Soc. 2008, 55, 1408–1414. [Google Scholar]
 CruzFilipe, L.; MarquesSilva, J.; SchneiderKamp, P. Formally verifying the solution to the Boolean Pythagorean triples problem. J. Autom. Reason. 2019, 63, 695–722. [Google Scholar] [CrossRef]
 Gonthier, G. Formal proof—The Four Color Theorem. Not. Am. Math. Soc. 2008, 55, 1382–1393. [Google Scholar]
 Gonthier, G.; Asperti, A.; Avigad, J.; Bertot, Y.; Cohen, C.; Garillot, F.; Roux, S.L.; Mahboubi, A.; O’Connor, R.; Biha, S.O.; et al. Machinechecked proof of the Odd Order Theorem. In Lecture Notes in Computer Science, Proceedings of the Interactive Theorem Proving 2013 (ITP 2013), Rennes, France, 22–26 July 2013; Blazy, S., PaulinMohring, C., Pichardie, D., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; Volume 7998, pp. 163–179. [Google Scholar]
 Hales, T.; Adams, M.; Bauer, G.; Dang, T.D. A Formal Proof of the Kepler Conjecture. Forum of Mathematics, Pi; Cambridge University Press: Cambridge, UK, 2017; Volume 5, pp. 1–29. [Google Scholar]
 Hales, T. A proof of the Kepler conjecture. Ann. Math. 2005, 162, 1065–1183. [Google Scholar] [CrossRef] [Green Version]
 Heule, M.; Kullmann, O.; Marek, V. Solving and Verifying the Boolean Pythagorean Triples Problem via CubeandConquer. In Lecture Notes in Computer Science, Proceedings of the Theory and Applications of Satisfiability Testing 2016(SAT 2016), Bordeaux, France, 5–8 July 2016; Creignou, N., Le Berre, D., Eds.; Springer: Cham, Switzerland, 2016; Volume 9710, pp. 228–245. [Google Scholar]
 Vivant, C. Thèoréme Vivamt; Grasset: Prais, France, 2012. [Google Scholar]
 Voevodsky, V. Univalent Foundations of Mathematics; Beklemishev, L., De Queiroz, R., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6642, p. 4. [Google Scholar]
 Katz, V. A History of Mathematics: An Introduction; Pearson AddisonWesley: Boston, MA, USA, 2009. [Google Scholar]
 Grabiner, J.V. Who gave you the epsilon? Cauchy and the origins of rigorous calculus. Am. Math. Mon. 1983, 90, 185–194. [Google Scholar] [CrossRef]
 Rusnock, P.; KerrLawson, A. Bolzano and uniform continuity. Hist. Math. 2005, 32, 303–311. [Google Scholar] [CrossRef] [Green Version]
 Courant, R.; Robbins, H.; Stewart, I. What Is Mathematics? An Elementary Approach to Ideas and Methods; Oxford University Press: Oxford, UK, 1996. [Google Scholar]
 Dovermann, K.H. Applied Calculus. 1999. Available online: https://math.hawaii.edu/~heiner/calculus.pdf (accessed on 20 December 2019).
 Lin, Q. Free Calculus: A Liberation from Concepts and Proofs; World Scientific: Singapore, 2008. [Google Scholar]
 Livshits, M. Simplifying Calculus by Using Uniform Estimates. 2004. Available online: https://www.mathfoolery.com/talk2004.pdf (accessed on 15 March 2020).
 Lusternik, L.A.; Sobolev, V.J. Elements of Functional Analysis, 3rd ed.; John Wiley & Sons: New York, NY, USA, 1975. [Google Scholar]
 Sparks, J.C. Calculus without LimitsAlmost; AuthorHouse: Bloomington, IN, USA, 2005. [Google Scholar]
 Zhang, J. Let calculus more elementary. J. Cent. China Norm. Univ. (Nat. Sci.) 2006, 45, 475–484. [Google Scholar]
 Lin, Q. Fast Calculus; Science Press: Beijing, China, 2009. [Google Scholar]
 Zhang, J. Straightforward Calculus; Science Press: Beijing, China, 2010. [Google Scholar]
 Zhang, J.; Tong, Z. Calculus without Limit Theory. 2018. Available online: https://arxiv.org/abs/1802.03029 (accessed on 10 September 2020).
 Lin, Q.; Zhang, J. What Can Be Done Prior to Calculus. Stud. Coll. Math. 2019, 22, 1–15. [Google Scholar]
 Lin, Q.; Zhang, J. Calculus prior to limits. Stud. Coll. Math. 2020, 23, 1–16. [Google Scholar]
 Lin, Q.; Tong, Z.; Zhang, J. Introducing continuity in calculus before limits. Stud. Coll. Math. 2020, 23, 1–10. [Google Scholar]
 Landau, E. Foundations of Analysis: The Arithmetic of Whole, Rational, Irrational, and Complex Numbers; Chelsea Publishing Company: New York, NY, USA, 1966. [Google Scholar]
 Fu, Y.; Yu, W. A Formalization of Properties of Continuous Functions on Closed Intervals. In Lecture Notes in Computer Science, Proceedings of the International Congress on Mathematical Software (ICMS 2020), Braunschweig, Germany, 13–16 July 2020; Bigatti, A., Carette, J., Joswig, M., de Wolff, T., Eds.; Springer: Cham, Switzerland, 2020; Volume 12097, pp. 272–280. [Google Scholar]
 Fu, Y.; Yu, W. Formalization of the Equivalence among Completeness Theorems of Real Number in Coq. Mathematics 2021, 9, 38. [Google Scholar] [CrossRef]
 Livshits, M. You Could Simplify Calculus. 2009. Available online: https://arxiv.org/abs/0905.3611 (accessed on 15 March 2020).
 Zhang, J. Axiomatic method for the definition of definite integral. J. Guangzhou Univ. 2007, 6, 1–5. [Google Scholar]
 Zhang, J.; Feng, Y. A new way viewing the foundation of calculus. Sci. China Ser. A 2009, 39, 247–256. [Google Scholar]
 Zhang, J.; Feng, Y. The third generation calculus. Chin. J. Nat. 2010, 32, 67–71. [Google Scholar]
 Van Benthem Jutting, L.S. Checking Landau’s “Grundlagen” in the AUTOMATH System. Ph.D. Thesis, Eindhoven University of Technology, Eindhoven, The Netherlands, 1977. [Google Scholar]
 Brown, C.E. Faithful Reproductions of the Automath Landau Formalization. Technical Report. 2011. Available online: https://www.ps.unisaarland.de/Publications/documents/Brown2011b.pdf (accessed on 28 July 2018).
 Guidi, F. Verified Representations of Landau’s “Grundlagen” in the lambdadelta Family and in the Calculus of Constructions. J. Formaliz. Reason. 2016, 8, 93–116. [Google Scholar]
 CruzFilipe, L. A Constructive Formalization of the Fundamental Theorem of Calculus. In Lecture Notes in Computer Science, Proceedings of the International Workshop on Types for Proofs and Programs (TYPES 2002), Bergen Dal, The Netherlands, 24–28 April 2002; Springer: Berlin/Heidelberg, Germany, 2002; Volume 2646, pp. 108–126. [Google Scholar]
 CruzFilipe, L.; Geuvers, H.; Wiedijk, F. CCoRN, the Constructive Coq Repository at Nijmegen. In Lecture Notes in Computer Science, Proceedings of the International Conference on Mathematical Knowledge Management (MKM 2004), Białowieża, Poland, 19–21 September 2004; Springer: Berlin/Heidelberg, Germany, 2004; Volume 3119, pp. 88–103. [Google Scholar]
 Boldo, S.; Lelay, C.; Melquiond, G. Coquelicot: A UserFriendly Library of Real Analysis. Math. Comput. Sci. 2015, 9, 41–62. [Google Scholar] [CrossRef] [Green Version]
 Guo, L.; Fu, Y.; Yu, W. A Mechanized Proof System of The Third Generation Calculus in Coq. Sci. China Ser. A 2021, 51, 115–136. [Google Scholar]
 Coquand, T.; Paulin, C. Inductively Defined Types. In Lecture Notes in Computer Science, Proceedings of the International Conference on Computer Logic (COLOG 1988), 12–16 December 1988; Springer: Berlin/Heidelberg, Germany, 1990; Volume 417, pp. 50–66. [Google Scholar]
 Coquand, T.; Huet, G. The calculus of constructions. Inf. Comput. 1988, 76, 95–120. [Google Scholar] [CrossRef] [Green Version]
 Luo, Z. ECC, an extended calculus of constructions. In Proceedings of the Fourth Annual Symposium on Logic in Computer Science, Pacific Grove, CA, USA, 5–8 June 1989; IEEE Press: Piscataway, NJ, USA, 1989; pp. 386–395. [Google Scholar]
 Boulier, S.; Pédrot, P.; Tabareau, N. The next 700 syntactical models of type theory. In Proceedings of the 6th ACM SIGPLAN Conference on Certified Programs and Proofs, Paris, France, 16–17 January 2017; ACM: New York, NY, USA, 2017; pp. 182–194. [Google Scholar]
 Yu, W.; Sun, T.; Fu, Y. Machine Proof System of Axiomatic Set Theory; Science Press: Beijing, China, 2020. [Google Scholar]
Code  Meanning 

$a\in A$  a is an element of the set A 
Minus_N $\phantom{\rule{4pt}{0ex}}x\phantom{\rule{4pt}{0ex}}y\phantom{\rule{4pt}{0ex}}l$  x minus y, l is proof “$x>y$” , x and y are natural numbers 
$a+b$  a plus b 
$ab$  a minus b 
$\lefta\right$  absolute value of a 
$a\xb7b$  a times b 
factorial n  $n!$, n is a natural number 
${a}^{\wedge}n$  ${a}^{n}$, n is a natural number 
$(a/b)\phantom{\rule{4pt}{0ex}}l$  a divide into b, l is proof “b <> 0” 
RdiN $r\phantom{\rule{4pt}{0ex}}N$  $\frac{r}{N}$, N is a natural number 
Rdifa $r\phantom{\rule{4pt}{0ex}}N$  $\frac{r}{N!}$, N is a natural number 
$\left[a\rightb],(a\leftb\right]$  $[a,b]$, $(a,b]$ 
maxfun $f\phantom{\rule{4pt}{0ex}}g$  $max\left\{f\right(x),g(x\left)\right\}$ 
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. 
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Fu, Y.; Yu, W. Formalizing Calculus without Limit Theory in Coq. Mathematics 2021, 9, 1377. https://doi.org/10.3390/math9121377
Fu Y, Yu W. Formalizing Calculus without Limit Theory in Coq. Mathematics. 2021; 9(12):1377. https://doi.org/10.3390/math9121377
Chicago/Turabian StyleFu, Yaoshun, and Wensheng Yu. 2021. "Formalizing Calculus without Limit Theory in Coq" Mathematics 9, no. 12: 1377. https://doi.org/10.3390/math9121377