Académique Documents
Professionnel Documents
Culture Documents
Amir Finkelstein
e-mail: amir.f22@gmail.com
Abstract
Ever since the early 1980's, computer scientists have been using dis-
crete versions of Green's and Stokes' theorems. These theorems were
shown to provide a tremendous computational gain, since they t pre-
cisely to the needs of Discrete Geometry researchers, due to their discrete
nature. In this book the author suggests that these theorems are actually
derived from a dierently dened Calculus, namely the "Calculus of De-
tachment". The main operator of this theory is dened by a mixture of
discrete and continuous math, to form a simpler and more ecient opera-
tor than the derivative. This approach to analyze functions is hence more
suitable for computers (in order to save computation time), and the sim-
plicity of the denition allows further research in other areas of Classical
Analysis.
Contents
I Prologue 5
1 Introduction 5
2 Previous Work 5
2.1 Integral Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Integral Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 A generalization of the Fundamental Theorem of Caclulus . . . . 7
2.4 Discrete Version of Stokes' Theorem . . . . . . . . . . . . . . . . 7
2
12 Dierentiability and the detachment 35
12.1 Joint points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
12.2 Dierentiability Vs. tendability of functions . . . . . . . . . . . . 37
12.3 Dierentiability related sucient conditions for tendability . . . 37
VI Epilogue 77
19 Future work 77
3
20 Appendix 78
20.1 A dierent denition to the limit process . . . . . . . . . . . . . . 78
20.2 Source code in matlab . . . . . . . . . . . . . . . . . . . . . . . . 80
4
Part I
Prologue
1 Introduction
Ever since the early 1980's, the discrete geometry community has issued inte-
gration algorithms that form discrete versions to the integration theorems of
the advanced Calculus (the discrete Green's theorem and the discrete Stokes'
theorem).
The discrete versions of these theorems were required to enable computational
eciency: for example, the discrete Green's theorem enables to calculate the
double integral of a function in a discrete domain (a domain whose boundary
is parallel to the axes, as is usually the case in discrete geometry) in a more
ecient manner with respect to the regular Green's theorem, due to the fact
that the calculation is taken place based on the corners of the discrete region,
and there is no need to pass through the entire boundary - as opposed to the
regular Green's theorem, that points out the connection between the double
integral and the line integral. The computational saving is enabled due to a
pre-processing, that includes a calculation of the antiderivative of the function.
In this paper we will suggest a theory - in R and in R2 - to the origin of these
discrete theorems. The paper is divided as follows. In part 1, depicted is a short
survey of early work in discrete geometry. In part 2 the basic operators are de-
ned. The operators are shown to be simple tools for the analysis of monotonic
regions of any function. The most fundamental operator, the detachment, forms
a hybridization between two kinds of mathematics: continuous math (Calculus)
and discrete math (the sgn (·) operator). In part 3 a mathematical discussion is
held, where: the connection between the properties of these operators to those
of the familiar derivative is surveyed; analogous versions to some of the most
fundamental theorems of Calculus are depicted; the geometric interpretation of
one of the operators is drawn; a discussion is held regarding the cases where
it is impossible to apply one or more of the operators to functions; a general
function that demonstrates the operators' approach is shown; and a structure
to the Calculus is suggested. In part 4, an engineering-oriented discussion is
held regarding the computational cost of the usage of the suggested operators.
Amongst others, a proof is suggested to the computational preferability of the
usage in these operators, when compared to the derivative. In part 5, terminol-
ogy and theorems are suggested, whose aim is to generalize the discrete Green's
theorem to a more generalized type of domain. In part 6 the paper is sealed;
the appendix suggests another denition to the limit process.
2 Previous Work
In this section the author chose to depict basic concepts from discrete geometry.
5
2.1 Integral Image
Followed is an introduction to probably one of the most stunning breakthroughs
in the eld of computational-gain driven integral calculus theorems over discrete
domains, which was rst introduced (to the author's knowledge) by Tang in
1982. The idea of summed area tables, was later introduced by Lance Williams
and Franklin Crow in ([6]). Yet, the most inuencial paper in this area is Viola
and Jones' Integral Image algorithm ([1]), which applies summed are tables to
fast calculations of sums of squares in an image.
2
Q
The idea is as follows. Given a function i over a discrete domain [mj , Mj ] ⊂
j=1
Z2 , dene a new function (sat stands for summed area table, and i stands for
image):
X
sat (x, y) = i (x0 , y 0 ) ,
x0 ≤x y 0 ≤y
V
and now the sum of all the values that the function i accepts on the grid [a, b] ×
[c, d] , where m1 ≤ a, b ≤ M1 and m2 ≤ c, d ≤ M2 , equals:
b d
X X
i (x0 , y 0 ) = sat (b, d) + sat (a, c) − sat (a, d) − sat (b, c) .
x0 =ay 0 =c
X
sat (x, y, z) = i (x0 , y 0 , z 0 ) ,
x0 ≤x y 0 ≤y z 0 ≤y
V V
and now the sum of all the values that the function i accepts on the grid [a, b] ×
[c, d] × [e, f ] , where m1 ≤ a, b ≤ M1 , m2 ≤ c, d ≤ M2 , and m3 ≤ e, f ≤ M3 ,
equals:
b d f
X X X
i (x0 , y 0 , z 0 ) = sat (b, d, f ) − sat (b, d, e) − sat (b, c, f ) + sat (b, c, e)
x0 =ay 0 =cz 0 =e
6
2.3 A generalization of the Fundamental Theorem of Ca-
clulus
Wang et al. ([7]) suggested to further generalize the Integral Image concept, in
2007. They issued the following argument, which forms a natural generalization
to the Fundamental Theorem of Calculus:
T T1
where
´ 1 , . . . , νk ) , ν = ν1 + . . . + νk , νi = 1 − νi , and B = {0, 1} . If
ν = (ν
k = 1, then f (x) dx = F (v1 ) − F (u1 ), which is the Fundamental Theorem of
D
Calculus. If k = 2, then
ˆ
f (x) dx = F (v1 , v2 ) − F (v1 , u2 ) − F (u1 , v2 ) + F (u1 , u2 ) ,
D
and so on.
7
Figure 1: The corners on which Wang et al.'s pointed out in their paper. The
numbers {±1, ±2} are the corner's αD , which is a term that this paper seeks
to dene in a rigorous manner.
gure 1 in Wang et al.'s paper (and in this paper's gure 1), x belongs to.
The goal of this paper is to nd a more rigorous denition to the term of αD
in the above theorem, research the pointwise operator that forms this term, and
nd a more general version to this theorem, which holds also for a non-discrete
domain. Some of the results that this paper depicts are depicted in gure 2.
8
Figure 2: The owered boxes are some of the results that this paper suggests.
9
Part II
Basic Terminology In Calculus
∃limsgn [f (x + h) − f (x)] .
h→0
10
Figure 3: The idea of the denition of the detachment is very simple. Let us
observe the term: f (x + h) − f (x). It is clear that for any continuous function,
it holds that: lim [f (x + h) − f (x)] = 0. The derivative, however, manages
h→0
to supply interesting information by comparing dy to dx, via a fraction. The
detachment uses less information, and quantizes dy , via the function sgn (·). The
detachment of the function does not reveal the information regarding the rate
of change of the function. It is a trade-o between eciency and information
level, as will be discussed later on.
f ; : R → {+1, −1, 0}
;
f (x) ≡ limsgn [f (x + h) − f (x)] .
h→0
;
f± : R → {+1, −1, 0}
;
f± (x) ≡ lim sgn [f (x + h) − f (x)] .
h→0±
11
Figure 4: An illustration to the detachment process. It is clear from this gure
why the term of detachment was selected: The function is being torn in its
extrema points.
∃limsgn [h · (f (x + h) − f (x))] .
h→0
3. I = (a, b], and f is signposted detachable for each x ∈ (a, b) and left
(signposted) detachable in b.
4. I = [a, b], and f is signposted detachable for each x ∈ (a, b), left (sign-
posted) detachable in b and right (signposted) detachable in a.
12
applied for f as:
f~±
;
: R → {+1, −1, 0}
f~±
;
(x) ≡ ± lim± sgn [(f (x + h) − f (x))] .
h→0
Examples.
1. Let us consider the following function:
f :R→R
(
x, x ∈ Q
f (x) =
x2 , x ∈
/ Q.
Then f is right detachable and right signposted detachable there, and
;
f+ (0) = +1. However, it is not left detachable there.
2. Let us consider the following function:
f :R→R
(
xsin x1 , x 6= 0
f (x) =
0, x = 0.
Then f is not right nor left detachable in x=0 since the limits
f :R→R
(
x2 sin x1 , x 6= 0
f (x) =
0, x = 0.
Then f is not right nor left detachable in x = 0 since the limits lim± sgn [f (h) − f (0)]
h→0
do not exist, although it is dierentiable in x = 0.
13
4. The function f : R → R, f (x) = |x| is detachable in x = 0 althought it is
not dierentiable there. f is also signposted detachable in R\ {0}.
5. It is not true that if f is detachable in a point x then there exists a
neighborhood I (x) such that f is signposted detachable in I . Let us
consider the following function:
f : [−1, 1] → R
2,
x=0
f (x) = (−1)n , x = n1 , n ∈ Z
0, otherwise.
f :R→R
(
0, x ∈ R\Z
f (x) =
1, x ∈ Z.
f; : R → R
(
0, x ∈ R\Z
f ; (x) =
−1, x ∈ Z,
f~; is not dened for integers since for all the points x∈Z it holds that
; ;
f+ (x) 6= −f− (x).
14
f : R → R, f (x) = x2 + x. Then:
7. Let us consider the function:
h i
; 2
f+ (x) = lim sgn (x + h) + x + h − x2 − x
h→0+
8. The function:
f :R→R
(
tan (x) , x 6= π2 + πk
f (x) = , k∈Z
0, x = π2 + πk
9. Riemann's function:
f :R→R
(
1
, x = pq ∈ Q
f (x) = q
0, x ∈ R\Q,
f : R\ {0} → R\ {0}
(
1
, x∈Q
f (x) = x 1
− x , x ∈ R\Q
is detachable from right for any point x > 0, and detachable from left for
any point x < 0. However, this function is discontinuous anywhere.
;
f± (x0 ) = k ⇐⇒ lim f ; (x) = k
x→x0
15
are incorrect. For example, the function:
f : [0, 1] → R
(
1, x = 0
f (x) =
0, 0 < x ≤ 1
;
satises lim f ; (x) = 0 although f+ (0) = −1. Further, the function:
x→0+
f : (−1, 1) → R
(
sin x1 , x 6= 0
f (x) =
17, x = 0.
;
satises that f+ (0) = −1 although lim f ; (x) does not exist.
x→0+
12. A function may be detachable in a point even if its limit in the point does
not exist from either sides. For example, let 1 be a constant, then the
function:
f :R→R
(
sin 1 + ,
x x 6= 0
f (x) =
0, x = 0,
13. Weirstrass' function has both uncountably many non-extrema points where
its detachment is not dened, and uncountably many extrema points,
where its detachment is dened.
χA f : R → r
χrA f (x) = rn ⇐⇒ f (x) ∈ An .
∃limχrA [f (x + h) − f (x)] .
h→0
16
Example. Any detachable function is generalized-detachable with respect to
S S
A = {0} (−∞, 0) (0, ∞), and the set of scalars {0, −1, +1}.
;(A,r)
f± : R→r
;(A,r)
f± (x) ≡ lim χrA [f (x + h) − f (x)] .
h→0s
17
Part III
Fundamental Properties of The
Detachment Operators
;
supf± : R → {+1, −1, 0}
;
supf± (x) ≡ limsupsgn [(f (x + h) − f (x))] .
h→0±
;
inf f± : R → {+1, −1, 0}
;
inf f± (x) ≡ liminf sgn [(f (x + h) − f (x))] .
h→0±
Examples.
1. Riemann's function is upper and lower detachble in any point, since for the
irrationals it holds that supf ; (x) = +1 and inf f ; (x) = 0. It is an easy
exercise to show that it is nowhere upper nor lower signposted detachable.
18
2. Dirichlet's function:
f : R → {0, 1}
(
1, x ∈ Q
f (x) =
0, x∈ / Q,
; ;
supf+ (x) 6= −supf− (x) .
; ;
inf f+ (x) 6= −inf f− (x) .
; ;
supf+ (x) 6= supf− (x) .
; ;
inf f+ (x) 6= inf f− (x) .
; ;
supf+ (x) 6= inf f+ (x) .
; ;
supf− (x) 6= inf f− (x) .
19
Corollary. A function f : R −→ R is detachable in a point x i x is only
a rst and second disdetachment point, and is signposted detachable there i x
is only a third and fourth disdetachment point.
Examples.
f : [0, 2] → R
(
1, 0 ≤ x < 1
f (x) =
2, 1 ≤ x ≤ 2.
Then x=1 is a rst, second, third and fourth type disdetachment point
of f. The function is also null disdetachable there.
f :R→R
(
x2 sin x1 , x 6= 0
f (x) =
0, x = 0.
Then x=0 is a rst, second, fth and sixth type disdetachment point of
f.
Defintion. f : R → R be a
Tendency indicator vector of a function. Let
function, and let x ∈ R be a point. Denote by ω ± (x) the set of partial limits of
±
the term sgn [f (x + h) − f (x)], where h → 0 respectively. Then the tendency
indicator vector of f in the point x is dened as a vector ~
s, whose entries satisfy:
si ≡ χs(i) ω r(i) (x) , 1 ≤ i ≤ 6,
where:
+1, i = 1, 4
( (
1, x ∈ X −1, 1 ≤ i ≤ 3
χx (X) = , r (i) = , s (i) = 0, i = 2, 5
0, x ∈
/X +1, 4 ≤ i ≤ 6
−1, i = 3, 6.
1. Let us consider the function f (x) = sin (x). Then in x = 0, its tendency
indicator vector is (1, 0, 0, 1, 0, 0).
2. Let us consider the function:
(
1
x2 sin x , x 6= 0
f (x) =
0, x = 0.
20
Figure 5: An illustration of the tendency indicator vector in a point. Given the
parabola f x (colored with red in the middle) on it, the tendency
and a point
indicator vector of f x is a binary vector, returning for each of the six options
in
depicted in the graph, whether the term sgn [f (x + h) − f (x)] has a partial
limit in that point, whose value is one of the options: if it has a partial limit +1
from left, then the rst entry in the vector is 1; if it has a partial limit 0 from
left, then the second entry in the vector is 1, and so on. The domains for which
the answer is yes in this example are colored with blue; hence the tendency
indicator vector here is (1, 0, 0, 1, 0, 0).
U
fn : D → R
n
U
fn (x) ≡ fn (x) , x ∈ Dn .
n
21
Algorithm 1 Classication of disdetachment points
Given a function f : R → R, a point x and the tendency indicator vector of f
in the point x, ~s = ~s (f, x), do:
; ; ; ;
1. Extract supf+ (x) , inf f+ (x) , supf− (x) , inf f− (x) via the entries of the
vector ~s, in the following manner (sup ts min and inf ts max, due to
the nature of the denition of the vector ~s):
;
(x) = ϕ argmin s+ s+
supf+ i : i =1
i
;
(x) = ϕ argmax s+ s+
inf f+ i : i = 1
i
;
(x) = ϕ argmin s− s−
supf− i : i = 1
i
;
(x) = ϕ argmax s+ s+
inf f− i : i = 1 ,
i
; ;
2. Ifsupf+ (x) 6= −supf− (x) classify f as having a rst type disdetachment
in x.
; ;
inf f+
3. If (x) 6= −inf f− (x) classify f as having a second type disdetach-
ment in x.
; ;
4. If supf+ (x) 6= supf− (x) classify f as having a third type disdetachment
in x.
; ;
5. Ifinf f+ (x) 6= inf f− (x) classify f as having a fourth type disdetachment
in x.
; ;
6. If supf+ (x) 6= inf f+ (x) classify f as having a fth type disdetachment
in x.
; ;
7. If supf− (x) 6= inf f− (x) classify f as having a sixth type disdetachment
in x.
22
Figure 6: Classication of disdetachment points as a function of the tendency
indicator vector in the point. Note the majority of the rst and second type dis-
detachment types, due to harsh requirement in the denition of the signposted
detachment.
23
6
six functions, f (i) : R → R i=1
, dened in the following manner:
Let us dene:
√ √
D1± = R± , D2± = 2Q± , D3± = 3Q± ,
√ √ S√
D4± = R± \ 2Q, D5± = R± \ 2Q 3Q , D6± = Ø.
Let
→
−
v = (v1 , . . . , v6 ) ∈ {0, 1}
6
be a vector whose at least one of the rst
three elements and at least one of last three elements is 1. Thus, there are
26 − 1 − 2 · 23 − 1 = 49 options to select → −
v.
Let k~ v : {1, . . . , 6} → {1, . . . , 6}
v be a transformation k~ such that:
S +
R+ = Dk~v (i)
1≤i≤3
−
Dk−~v (i) ,
S
R =
4≤i≤6
±
where Dk(i) are pairwise disjoint, and:
k~v (i) 6= 6 ⇐⇒ vi = 1.
→
− →
Let us dene a vector of domains, D (−
v ), by:
→
− r(i)
D (vi ) ≡ Dk(i) ,
(
−1, 1 ≤ i ≤ 3
where r (i) = . Then the weather vane function is dened thus:
+1, 4 ≤ i ≤ 6
> (x, →
−
]
v)≡ f (i) |→
−
D (v )
.
i
i
24
Figure 7: An illustration of the weather
−−− −−−−−−→ −−vane
−−−−−−−→
function. Above:
25
• Ifs2 + s5 = 1 (mod2) then > can be upper or lower detachable. For
example if
→
−s = (1, 0, 0, 0, 1, 1) then > is not lower nor upper detachable.
→
−
However, in the case where s = (1, 0, 0, 1, 1, 0), the function is upper
4
detachable, but not detachable from any other kind. (2 · 2 = 32 cases).
Notice the similarity between this denition of the tendency indicator vector of
a function and the weather vane function. It is easy to verify that for any
→
−
v
amongst the 49 possible cases:
~s (> (x, →
−
v ) , 0) = →
−
v.
f : R → {0, 1, 2}
2, x ∈ Z
f (x) = 1, x ∈ Q\Z
0, x ∈ R\Q.
26
1. I = (a, b) , and f is tendable for each x ∈ (a, b).
2. I = [a, b), and f is tendable for each x ∈ (a, b) and right detachable in a.
3. I = (a, b], and f is tendable for each x ∈ (a, b) and left detachable in b.
4. I = [a, b], and f is tendable for each x ∈ (a, b), left detachable in b and
right detachable in a.
Definition. Tendency in a point. Given function f : R → R, if it is tendable
in a point x ∈ R, then we will dene its tendency in the following manner:
τf : R → {+1, −1, 0}
(
; ;
0, f+ (x) = f− (x)
τf (x) ≡ ; ; ;
f+ (x) , f+ (x) 6= f− (x)
τf (x) = β, ∀x ∈ I\ {a, b} .
Examples.
f :R→R
f (x) = x2 .
then the tendency of f is:
τf : R → R
−1, x < 0
τf (x) = 0, x=0.
+1, x > 0
27
Definition. Extrema indicator. Given an function f : R → R, we will dene
its extrema indicator in the following manner:
∧f : R → {0, −1}
(
0, ~s (f, x) ∈ {(1, 0, 0, 1, 0, 0) , (0, 0, 1, 0, 0, 1) , (0, 1, 0, 0, 1, 0)}
∧f (x) ≡ ,
−1, otherwise
where ~s (f, x) is the tendency indicator vector of f in the point x dened ear-
lier. It is easy to see that the extrema indicator is dened for any point of any
function.
;
If+ (x) = x, x − f+
(x) · h
;
If− (x) = x, x − f−
(x) · h ,
(
+1, xi > x2−i
sgn[x1 ,x2 ] (xi ) = , i = 1, 2
−1, xi < x2−i
X
τf (x) = sgnIfs (x) (x) .
; ;
s∈{±1} and fs (x)=f (x)
+
28
Figure 8: The correlation between the tendency in a point, and the sign of
that point as a vertice in the interval. The± signs in the extremum deduct
eachother, and suggest that the tendency is 0.
; ; ; ;
Proof. Let us observe the possible values for f+ (x) , f− (x). If f+ (x) = f− (x)
then according to the denition of tendency,τf (x) = 0, in which case:
X
sgnIfs (x) (x) = sgnI + (x) (x)+sgnI − (x) (x) = +1+(−1) = 0 = τf (x) .
f f
; ;
s∈{±1} and fs (x)=f (x)
+
; ;
If on the other hand f+ (x) 6= f− (x) then according to the denition, τf (x) =
;
f+ (x). Hence:
(
X +1, f is increasing in x
sgnIfs (x) (x) = sgnI + (x) (x) =
;
s∈{±1} and fs (x)=f
;
(x)
f −1, f is decreasing in x
+
;
= f+ (x) = τf (x) .
Remark. Clearly the above claim states the geometric connection between
the tendency of a function and its intervals in a point, in a similar manner that
the derivative is the slope of the tangent to a function in a point. The above
claim is illustrated in gure 8.
29
Note. The above statement does not hold for detachment for right. Con-
sider the following function:
f : (0, 1) → R
(
1
, x∈Q
f (x) = x 1
− x , x ∈ R\Q.
Then f is detachable from right everywhere in (0, 1), however it is also discon-
tinuous and disdetachable everywhere there. It is easy to see that any function
that is detachable from right and not detachable from left consists of two pieces
1
x and
(in this example, the pieces are − x1 ). the following note refers to a simple
generalization of the detachment.
A1 = (−∞, −) , r1 = −1
A2 = (−, +) , r2 = 0
A3 = (+, ∞) , r3 = +1,
f : (0, 1) → (−1, 1)
− 3 , x ∈ Z
f (x) = 0, x ∈ Q\Z
+ 3 , x ∈ R\Q.
Then f ;(A,r) ≡ 0 for all x ∈ R. It is easy to see that one can build functions
with as many pieces as desired, which are discontinuous anywhere and yet
generalized detachable (in the above sense) everywhere.
f : (−1, 1) → R
(
sin x1 , x 6= 0
f (x) =
17, x = 0.
30
Then f is tendable in (−1, 1), however due to its discontinuity in x = 0, the
existence of an interval where f is monotonous is not guaranteed, and indeed
there does not exist such in that example.
Note. The following claim is also incorrect: If a function f :R→R is tend-
able and continuous in a neighborhood of the point, then there exists left and
right neighborhoods of that point where the function is monotoneous. Followed
is a counter example:
f : (−1, 1) → R
(
xsin x1 − x, x 6= 0
f (x) =
0, x = 0.
Then f is tendable in (−1, 1), further it is continuous there, however there does
not exist any - left nor right - neighborhood of x=0 where f is monotonous.
10.2 Detachment
Definition. Step function. We will say that a fucntion → R is a step
f : RS
function if there exist a sequence of disjoint intervals {Ak } with Ak = R, and
k
a sequence of scalars {rk } such that:
X
f (x) = rk · χAk (x) ,
k
31
and similarly denote mn theTset of all points in the interval where f recieves a
local minimum. Clearly Mn mn is not necessarily empty, in case f is constant
in a sub-interval of [a, b]. Now, since each x ∈ [a, b] is a local extremum of f ,
we obtain: [h [ i
[a, b] = m n Mn ,
n∈N
hence [h [ i
f ([a, b]) = f (mn ) f (Mn ) .
n∈N
S
To prove the argument we need to show that for each n ∈ N, the set f (mn ) f (Mn )
is countable. Without loss of generality, let us show that f (mn ) is countable.
1 −1
Let y ∈ f (mn ) . Let Dy be a
T 2n -neighborhood of f (y). Let z ∈ f (mn )
with z 6= y , and let x ∈ Dy Dz . Then there exist xy , xz ∈ mn such that
f (xy ) = y, f (xz ) = z and:
1 1
|xy − x| < , |xz − x| < .
2n 2n
1
Hence, |xy − xz | <n . Since in both the n-neighborhoods of xy , xz , f receives
its largests value in xy and xz , it must hold that f (xy ) = f (xz ), contradict-
T
ing the choice of
T y 6= z . Hence, Dy Dz = ∅. Now, let us observe the set
C = [a, b] Q. Any set Dy , for y ∈ f (mn ), contains an element of C . Since
Dy , Dz are disjoint for any y 6= z and since C is not countable, then f (mn )
is also countable. Hence, f ([a, b]) is countable, which implies that f is a step
function, according to the denition.
Remarks.
1. The second direction is not true: a step function may not be detachable
in the entire interval, for example:
f : [0, 2] → R
(
0, 0 < x < 1
f (x) =
1, 1 ≤ x < 2
which is not detachable in x = 1.
2. It is not true that if a function f : R → R is detachable in an interval [a, b]
then it is constant there except, maybe, in a countable set of points. For
example, consider the function:
f : [0, 2] → R
0, 0 < x < 1
f (x) = 2, x = 1
1, 1 < x < 2.
32
Corollary. f : R → R is detachable in an interval (a, b) and
If a function
f ; ≡ 0, then f is constant there.
its detachment is constant there,
Proof. Immediate from the fact that f is a step function, beacuse had there
;
been any jumps in the values of f , then it would hold that f (x) 6= 0 in any
such jump point x.
; ;
1. f~; (x) = +1, f~; (y) = −1. That is, f− (y) = f+ (x) = +1, hence argmaxf (t) ∈
/
t∈[x,y]
{x, y}. f [x, y], hence there exists t ∈ (x, y) where f re-
is continuous in
ceives its maximum, hence f is detachable, and not signposted detachable
in t, a contradiction.
33
;
If s = −∞ then f [x, y] , hence f+
is constant in (x) = 0, hence f is either
~;
not signposted detachable in x or f (x) = 0, a contradiction. That is,
x < s < y. Hence there exists a left neighborhood of s where f (t) 6= f (y)
for each t in that neighborhood, and a right neighborhood of s where
; ;
f (t) = f (y) for each t in that neighborhood. Hence f− (s) 6= 0, f+ (s) =
0, which implies that f is null-disdetachable, and especially not signposted
detachable, in x = s, a contradiction.
10.4 Derivative
Note. If a function is brokenly both continuous and signposted detachable,
then it is dierentiable almost everywhere.
Proof. According to a previous lemma, this condition assures that the func-
tion is monotoneous, which in turn insures dierentiability almost everywhere
by Lebesgue's theorem.
Note. Let us note that while a function's monotony implies that it is dif-
ferentiable ALMOST everywhere (by Lebesgue's theorem), it implies that it is
signposted detachable, and especially tendable everywhere.
f : (0, 2) → R
(
x, 0 ≤ x ≤ 1
f (x) =
1, 1 ≤ x ≤ 2
; ; ;
satises that f− (x) = −f+ (x) for each x ∈ (0, 2) \ {1}, however: f+ (1) =
;
0, f− (1) = −1 and f is indeed not stricly monotonous there.
f : [−1, 1] → R
n,
x = n1 , n ∈ Z\ {0}
f (x) = −1, x = 0
0, otherwise.
34
Figure 9: The derivative has an advantage over the detachment: it is a linear
operator. However, in the era of computers, eciency is not less important.
The detachment asks the question: "Function, are you increasing, decreasing
or constant?", while the derivative uses the information about the tangent to
answer that question. Hence the detachment is more computationally ecient
in determining the monotonic behavior of a function. Generalizations of the
detachment, such as limQ [f (x + h) − f (x)], where Q is a quantization func-
h→0
tion, can give more information regarding the behavior of the function in the
neighborhood of a point with respect to the regular detachment; the eciency
is hardly harmed in the generalization process, since the values that Q gets is
nite, and since the divison operator in the denition of the derivative is spared.
f : (0, π) → R
(
π
tan (x) , x 6= 2
f (x) = π
0, x= 2.
35
Figure 10: Joint points, arrayed according to their type.
Examples.
f :R→R
f (x) = |x|
36
2. Consider the function:
f : [0, 2] → R
(
x, 0≤x<1
f (x) =
2x − 1, 1 ≤ x < 2.
f : [0, 2] → R
(
1, 0 ≤ x < 1
f (x) =
x, 1 ≤ x < 2.
f : [−1, 1] → R
(
sin x1 , x 6= 0
f (x) =
17, otherwise
and:
g : [−1, 1] → R
(
x2 sin x1 , x 6= 0
g (x) = .
0, x=0
37
p. 99):
f (x) − f (x0 )
∃δ : x0 < x < x0 + δ =⇒ ≤ L < 0.
x − x0
Especially, it implies that there exists a right neighborhood of x0 where for each
x it holds that f (x)−f
x−x0
(x0 )
< 0. Since it is a right neighborhood, x0 < x, hence
;
sgn [f (x) − f (x0 )] = −1, hence f+ (x0 ) = −1.
0
Corollary. f : R → R
Let be a function and let x 0 ∈ R. If f± (x0 ) 6= 0
0
;
then f± = ±sgn f± (x0 ) .
0 ;
Proof. We show that f+ (x0 ) > 0 implies f+ (x0 ) = +1. Indeed, the condition
0 ;
f+ (x0 ) > 0 implies D+ f (x0 ) > 0, hence by the previous claim f+ (x0 ) = +1.
38
Note. The tendable functions are not closed under addition. For example,
consider the following functions:
f : [−1, 1] → R
−1, x = 0
f (x) = n, x = n1 , n ∈ Z
0, otherwise,
and:
g : [−1, 1] → R
(
+1, x = 0
g (x) =
0, otherwise.
f + g : [−1, 1] → R
(
n, x = n1 , n ∈ Z
(f + g) (x) =
0, otherwise
is not tendable in x = 0.
Note. The functions which are both tendable and dierentiable are also not
closed under addition. For example, consider the following functions:
f : [−1, 1] → R
(
x2 sin x1 − x2 ,
x 6= 0
f (x) =
0, x = 0,
and:
g : [−1, 1] → R
g (x) = x2 .
Then f, g are both dierentiable and tendable in their denition domain, how-
ever
f + g : [−1, 1] → R
(
x2 sin x1 , x 6= 0
(f + g) (x) =
0, x=0
is not tendable in x = 0.
39
13.2 Arithmetic rules
Claim. Let f : R → R be a tendable function. Let c ∈ R be a constant. Then:
; ;
[cf ]± = sgn (c) f± .
Proof.
;
[cf ]± (x) = lim sgn {[cf ] (x + h) − [cf ] (x)} =
h→0±
;
= lim sgn {c [f (x + h) − f (x)]} = sgn (c) f± .
h→0±
f (a) : R → R
(
f (x) + f (a) , x 6= a
f (a) (x) =
f (a) , x = a.
h i; ; ;
(x)
(f g) (x) = f (x) (x) · g (x) (x) .
± ± ±
Proof.
; ; h i h i
f (x) (x) · g (x) (x) = lim± sgn f (x) (x + h) − f (x) (x) · lim± sgn g (x) (x + h) − g (x) (x)
± ± h→0 h→0
; ;
f+ (−x) = f− (x) .
40
Proof.
;
f+ (−x) = lim sgn [f (−x + h) − f (−x)] = lim+ sgn [f (x − h) − f (x)]
h→0+ h→0
;
= lim− sgn [f (x + h) − f (x)] = f− (x) ,
h→0
; ;
f+ (x) = −f− (−x) .
Proof.
;
−f− (−x) = − lim− sgn [f (−x + h) − f (−x)] = − lim− sgn [−f (x − h) + f (x)]
h→0 h→0
τf (x0 ) = 0.
41
1. f is continuous in [a, b] .
2. f (a) = f (b) .
Then, there exists a point c ∈ (a, b) where f is detachable, and especially,
τf (c) = 0.
Proof. f is continuous in a closed interval, hence according to Weirstrass'
theorem, it recieves there a maximum M and a minimum m. In case m < M ,
f (a) = f (b), then one of the values m or M must be
then since it is given that
−1
an image of one of the points in the open interval (a, b) . Let c ∈ f ({m, M }).
Since f receives an extremum in c, then f is detachable there according to the
denition of detachment, and especially, τf (c) = 0. In case m = M , then f is
constant and the claim holds trivially.
f : [0, 2] → R
(
0, 0 ≤ x < 1
f (x) =
1, 1 ≤ x ≤ 2
Proof. First let us comment that this theorem is illustrated in gure . With-
out loss of generality, let us assume that v ∈ (f (a) , f (b)).
f (a) < f (b) . Let
Since f is continuous, then Cauchy's intermediate theorem assures that f −1 (v) 6=
; −1
∅. On the contrary, let us assume that f+ (x) = −1 for each x ∈ f (v) . Let
xmax = sup f −1 (v) . The maximum is accepted since f is continuous, hence
;
f (xmax ) = v . Then according to our assumption f+ (xmax ) = −1, and espe-
cially there exists a point t > xmax such that f (t) < f (xmax ) = v . But f
is continuous in [t, b] , thus according to Cauchy's intermediate theorem, there
exists a point s ∈ [t, b] for which f (s) = v, which contradicts the choice of xmax .
; −1
In the same manner it impossible that f+ (x) = 0 for each point x ∈ f (v) ,
;
because then the same contradiction will rise from f+ (xmax ) = +1. Hence,
T ;
S = f −1 (v)
x|f+ (x) = +1 6= ∅. Now we will show that S must contain a
42
;
point x for which f− (x) 6= +1. Let us observe xmin = inf S. We will now show
;
that f+ (xmin ) = +1. From the continuity of f it follows that f (xmin ) = v,
;
hence xmin > a. If f+ (xmin ) 6= +1, then xmin is an inmum, and not a mini-
mum, of S . Hence according to the denition of inmum, there exists a sequence
of points xn & xmin , such that xn ∈ S for all n. Especially, f (xn ) = v, hence
;
f+ (xmin ) = 0 (otherwise, f would not be right detachable, and especially, would
;
not be tendable, in xmin ). But f+ (xmin ) = 0 implies that there is a right neigh-
borhood of xmin where f is constant (f (x) = v for each x in that neighborhood),
;
and especially f+ (x) = 0 for each x in that neighborhood, which contradicts
the denition of xmin as an inmum of a set whose points' right detachment
;
is +1. Hence xmin = min (S) , which implies that f+ (xmin ) = +1. On the
;
contrary, suppose that f− (xmin ) = +1. Then especially there exists t < xmin
with v = f (xmin ) < f (t). But f is continuous in [a, t] , and f (a) < f (t) = v ,
−1
T
hence according to Cauchy's intermediate theorem, f
−1 T (v) (a, t) 6= ∅. Let us
observe s = max f (v) (a, t) . Then it can be shown in a similar manner
;
that f+ (s) = +1, hence s ∈ S , which forms a contradiction since s < xmin .
; ;
Thus cv = xmin satises that f (cv ) = v , f+ (cv ) = +1, and f− (cv ) 6= +1.
Thus, τf (cv ) = +1.
Note. The above theorem is no longer true if we demand that for any value v
there exists cv where:
f : [0, 2] → R
(
x, 0≤x≤1
f (x) =
2x − 1, 1 ≤ x ≤ 2.
43
Figure 11: An illustration to the analogous version to Lagrange's theorem.
Given a function which is continuous in [a, b] and tendable in (a, b), then
for any value v ∈ (f (a) , f (b)) there is a point cv ∈ f −1 (v) for which
τf (cv ) = sgn [f (b) − f (a)] . In the depicted graph, there is only one such
−1
point, highlighted with yellow. Notice that although {t1 , t2 , t3 } ∈ f (v) ,
none of them satises the theorem's conditions, since τf (t1 ) = τf (t3 ) = 0
and τf (t2 ) = −1, while sgn [f (b) − f (a)] = +1.
44
; ;
maximum, then f ; (x0 ) = −1, and especially
f+ (x0 ) = f− (x0 ), which implies
that τf (x0 ) = 0. Thus, Im τf |Iδ (x0 ) = {0, ±1} .
Note. If f is not continuous then the above theorem does not hold. Con-
sider the following function:
f : [0, 2] → R
(
0, x 6= 1
f (x) =
1, x = 1.
F :R→R
´x
F (x) = f (t) dt.
−∞
Fp : [p, ∞) → R
´x
Fp (x) = f (t) dt.
p
Fp : R → R
´x
Fp (x) = f (t) dt.
p
45
each side is the same as the limit of the sign of the function itself, in that side.
;
Proof. Without loss of generality, let us assume that
+
(x0 ) = +1, and f (x0 )
;
we will show that (Fp ) (x0 ) = +1. The rest of the cases are handled similarly.
+
According to the denition of pointwise incremented function and detachment,
we have:
; h i
f (x0 ) (x0 ) = lim+ sgn f (x0 ) (x0 + h) − f (x0 ) (x0 )
+ h→0
;
Somce f (x0 )
+
(x0 ) = +1, it follows that there exists a right neighborhood
of x0 , namely Iδ (x0 ) , where f (x) > 0 for each x ∈ Iδ (x0 ) . Hence for each
x ∈ Iδ (x0 ):
ˆx ˆx ˆx0
f (t) dt > 0 =⇒ f (t) dt − f (t) dt > 0 =⇒ Fp (x) > Fp (x0 ) ,
x0 p p
;
which results with (Fp )+ (x0 ) = +1.
46
Figure 12: A suggested structure of the Calculus. The functions' denitions are
found in gure 13.
47
Figure 13: The functions' denition for gure 12.
48
Part IV
Computational Cost Related
Discussion
In this part the author suggests a rigorous discussion regarding the eciency of
applying the derivative Vs. applying the extrema indicator, in a point.
Examples.
n ˜ n = {±1},
1. Let an = (−1) , n ∈ N. Then plima while the set of partial
limits of an is {±1}.
2. Let: (
17, n < 10100
an = n
(−1) , n ≥ 10100 .
Corollary. If the above conjecture is shown to hold, then for any engineering-
oriented requirement, partial limits can be found by the limit approximation
49
process.
Remark. In order to approximate the limit of a sequence (rather than just its
partial limit), or the limit of a function , one may sample S1 sub-sequences
and approximate the partial limits for each of them.
15 Computational cost
Definition. Computational cost of singular expressions. Given a singular
operator ♣, a computer c, and a number r, we will dene the computational cost
of the expression ♣ (r) given the computer, as the period of time required for
the computer to evaluate the term ♣ (r), assuming that the computer's memory
and computational power is wholly devoted to that mission. We will denote this
cost by:
Υc (♣ (r)) .
50
the evaluation of singular expressions. Although the sgn (·) operator can be
interprated as an assembly of logical boolean expressions, i.e (in C code):
the computer in fact may not use this sequence of boolean expressions. The
computer may only check the sign bit of the already evaluated expression r (if
such a bit is allocated). Especially, for any computer c, for the ”÷” operator
and for any numbers r, r0 , it holds that:
Υc (sgn (r)) Υc (r ÷ r0 ) ,
since the evaluation of the right-side expression operator involves bits manip-
ulation, and requires a few cycles even in the strongest arithmetic logic unit
(ALU), which are spared in the evaluation of the sign.
Examples.
51
Claim. Given a non-parametric dierentiable function f : R→R (by non-
parametric the author means that the formula of f is unknown, and especially
the derivative cannot be calculated simply by placing x0 in the formula of
the derivative) and a computer c, the computational cost of approximating
its derivative in a point x0 ∈ R is much higher than the computational cost of
approximating its extremum indicator, i.e.:
Proof. Let us analyze the cost of the two main stages of the approximation
of both the derivative and the extremum indicator:
1. The set of limits the computer needs to guess from. Let us assume that a
sophisticated pre-processing algorithm managed to reduce the suspected
values of the derivative (all of which one should verify in the denition of
the approximation of the limit, as in the example above) to a very large,
however nite set. Note that in order to approximate the extremum indi-
cator, on the paper there seems to be more work (because there are more
partial limits - namely 6 - to calculate); however, they are all calculated
parallely (the computer program may choose the same sequences used to
approximate the derivative, and summarize the approximated partial lim-
its of the upper and lower left and right detachments there). Further, the
set of candidate partial limits for the extremum indicator is nite and very
small: {0, ±1}.
2. The calculated term inside the limit. Notice that the dierence between
the derivative and the detachment is the ÷ operator vs. the sgn operator.
As we mentioned earlier,
Υc (sgn (r)) Υc (r ÷ r0 ) ,
and this is for any r, r0 . Hence the computational cost of any of the
expressions inside the limit is cheaper for the detachment (hence for the
extremum indicator) than the for the derivative.
To sum up, in both stages of the approximation of the limit there is a massive
computational advantage to the extrema indicator over the derivative.
52
Part V
The discrete Green's theorem in a
non-discrete domain
16 Tendency of a curve
16.1 Basic terminology
Definition. Antiderivative. Let f : R2 → R be a Lebesgue-integrable func-
tion. Then its antiderivative is dened as follows:
F : R2 → R
´
F (x1 , x2 ) ≡ f dλ,
B
2
Q
where B≡ (−∞, xi ) .
i=1
2
Q
Fp : [pi , ∞)→ R
i=1
´
Fp (x1 , x2 ) ≡ f dλ,
Bp
2
Q
where B≡ (pi , xi ) .
i=1
53
(x (t0 ) , y (t0 )) ∈ C be a point on the curve. We will dene the tendency indica-
tor vector of the curve C in the point , as:
4
~s (C, t0 ) : C → {+1, −1, 0}
~s (C, t0 ) ≡ x;+ , x;− , y+
; ;
, y− |t0 .
2
Definition. A partial quadrant in R2 . x ∈ R2 , let v ∈ {+1, −1}
Let and
+ 2
u ∈ (R ) . Then the partial quardant associated with v and u is the set:
2
Definition. A quadrant of a point in R2 . Let x ∈ R2 , and let v ∈ {+1, −1} .
Then we will dene the quardant of the given point which is associated with v
in the following manner:
Ov (x) ≡ {x + y| y ∈ Ov } ,
where Ov is the quadrant which is associated with v.
54
Figure 14: An illustration to perpendicular and slanted edges points, with their
associated tendency indicator vector.
perependicular edge point of the curve if the curve is perpendicular to one of the
axes in a neighborhood of γ (t0 ) . An illustration to perpendicular edge points
is given in gure 14.
55
Figure 15: An illustration to slanted edges points, with their associated tendency
indicator vector.
56
Figure 16: An illustration to slanted edges points, with their associated tendency
indicator vector.
are contained in the same quadrant of the point γ (t0 ). An illustration to slanted
corners is given in gure 16.
57
Figure 17: An illustration to abtuse corners for a curve whose orientation is
positive, with their associated tendency indicator vector.
58
Figure 18: An illustration to acute corners for a curve whose orientation is
positive, with their associated tendency indicator vector.
59
Figure 19: An illustration to abtuse corners for a curve whose orientation is
positive, with their associated tendency indicator vector.
60
Definition. Tendency of a tendable curve. Let C = γ (t) = (x (t) , y (t)) , 0 ≤
t≤1 be a tendable curve. We will dene the tendency of the curve C in the
point z = γ (t0 ) = (x (t0 ) , y (t0 )) ∈ C , as a function, τC : C → {+1, −1, 0},
where its values are determined according to the tendency indicator vector at
the point, ~s (C, t0 ) ≡ x;+ , x;− , y+
; ;
, y− |t0 , according to the cases depicted in
gure 20. The tendency is determined according to the following rules:
τC (z) = −x;+ · y+
;
|t0 = −x;− · y−
;
|t0 .
The second equality is due to the denition of a slanted edges point and
a slanted corner.
where s ∈ {±1} is the orientation of the curve (+1 for a positively oriented
curve, −1 for a negatively oriented curve).
• The tendency in obtuse corners in a positively oriented curve and in acute
corners in a negatively oriented curve is determined according to the fol-
lowing rule:
τC (z) = − |max| x;+ · y+
;
, x;− · y−
;
|t0 .
61
Figure 20: A summary of the tendency of a curve in a point as a function of
the tendency indicator vector. Positive, Negative and Zero stand for a
tendency of +1, −1 and 0 respectively.
62
Figure 21: An illustration to the term quadrant vectors of a point on a curve.
Notice that the point z1 v whose partial quadrants are fully
has only one vector
contained in a left hand side of C1 , hence: QV (C1 , z1 ) = {(−1, −1)}, and that
the point z2 has two vectors v1 , v2 whose partial quadrants are fully contained
in a left hand side of C2 , hence: QV (C2 , z2 ) = {(+1, +1) , (+1, −1)}.
with orientation s (where s ∈ {±1}, to denote that the curve is either positively
or negatively oriented), we will dene the quadrant vectors of the point z∈C
on the curve as the set:
where Ov,u (z) are the partial quardants of the point dened earlier. It is easy to
see that the choice of the curve C from the denition of the left hand side does
not aect the choice of v , hence the above term is well dened. The denition
is illustrated in gure 21.
π (v) = v1 · v2 .
X
τC (z) = π (v) ,
v∈QV (z,C)
P
where if QV (z, C) = ∅ then we will dene π (v) = 0.
v
Proof. By inspecting all possible cases (the number of cases is bounded by
63
Figure 22: An illustration of quadrant vectors vs. tendency. Observe that
P
QV (z1 , C1 ) = {(+1, +1) , (−1, +1) , (−1, −1)} , hence π (v) = 1 − 1 +
v∈QV (z1 ,C1 )
t
1 = +1, and indeed the tendency in +1, P s (C1 , z1 ) = (+1, 0, 0, −1) .
z1
since ~ is
Further, QV (z2 , C2 ) = {(+1, −1)} , hence π (v) = −1, and indeed the
v∈QV (z1 ,C1 )
t
tendency in z2 is −1, since ~s (CP
2 , z2 ) = (0, +1, −1, 0) . Next, QV (z3 , C3 ) =
{(+1, +1) , (−1, +1)} , hence π (v) = +1 − 1 = 0, and indeed the ten-
v∈QV (z1 ,C1 )
t
dency in z3 is 0, since ~s (C3 , z3 ) = (+1, −1, 0, 0) P- in fact, z3 is a perpendicular
edge point. Finally, QV (z4 , C4 ) = ∅, hence π (v) = 0, and indeed the
v∈QV (z1 ,C1 )
t
tendency in z4 is 0, since ~s (C3 , z3 ) = (−1, +1, −1, −1) - in fact, z4 is a switch
corner.
64
hence the curve's points are fully contained in the square [x (0) , y (0)]×[x (1) , y (1)] .
(
x (t) = ct + a (1 − t)
γ1+ :
y (t) = b
(
x (t) = c
γ2+ :
y (t) = dt + b (1 − t)
(
x (t) = a
γ1− :
y (t) = dt + b (1 − t)
(
x (t) = ct + a (1 − t)
γ2− :
y (t) = d,
where, in each term, it holds that 0 ≤ t ≤ 1. Then, we will sat that γ + ({x, y}) ≡
γ1+ γ2+ and γ − ({x, y}) γ1− γ2− are the straight paths between the two
S S
≡
points. We will refer to γ ({x, y}) , γ − ({x, y}) as the positive and negative
+
where Cβs , Cβ−s are the paths of the Cβ . We will refer to D+ (Cβ ) as the selected
domain of the continuous uniformly tended curve.
65
Figure 23: An illustration to the denition of the slanted line integral. In
this example, the curve C has a highlighted curve, denoted by Cβ . This is a
uniformly tended curve, whose tendency is β = −1 (since the tendency indicator
t
vector on Cβ is (−1, +1, −1, +1) and according to the denition). Further,
the tendency in the subcurve's end points is β0 = −1 and β1 = −1 fflfor the
point γ (0) and γ (1) respectively. Hence according to the denition: Fp =
´
Cβ
γ1+ (1) − 1
f dλ + Fp 2 [Fp (γ (1)) + Fp (γ (0))] .
D + (Cβ )
ˆ
1
Fp ≡ f dλ − βFp (γ1s (1)) + [β0 Fp (γ (0)) + β1 Fp (γ (1))] ,
2
Cβ
( )
D + Cβ
s + −
where γ1 is either γ or γ according to the sign of s, and β0 , β1 are the curve's
tendencies in the points γ (0) and γ (1) respectively. An ilustration to that def-
inition is given in gure 23.
66
Theorem (The Fundamental Theorem of Calculus In Rn ).
Given a function f (x) : Rk −→ Rm , and a rectangular domain D = [u1 , v1 ] ×
. . . × [uk , vk ] ⊂ Rk , then if there exists an antiderivative F (x) : Rk −→ Rm , of
f (x), then:
ˆ
ν T1
X
f (x) dx = (−1) F (ν1 u1 + ν 1 u1 , . . . , νk uk + ν k uk ) ,
D ν∈B k
T
where ν = (ν1 , . . . , νk ) , ν T1 = ν1 + . . . + νk , νi = 1 − νi , and B = {0, 1} .
(1) (2)
Lemma. (Additivity). Let C1 = Cβ , C2 = Cβ two uniformly tended curves,
that satisfy:
(1) (2)
\
∃!x ∈ R2 : x ∈ Cβ Cβ ,
and let us also assume that both the curves share the same orientation s. Let
us consider a function f : R2 −→ R which is Lebesgue-Integrable there. Let us
2
consider its local antiderivative, Fp , where p ∈ R . Let us consider the curve
(1) S (2)
Cβ ≡ Cβ Cβ . Let us denote the curves by C1 = γ1 , C2 = γ2 and C = γ
accordingly. Then:
Fp = Fp + Fp .
Cβ (1) (2)
C C
β β
Proof. First let us note that the proof is illustrated in gure 24. Without
T
loss of generality, let us assume that C1 C2 = γ1 (1) = γ2 (0). Let us denote
s s s
the paths of the curves C1 , C2 and C by γ1,i , γ2,i and γi accordingly, where
i ∈ {1, 2}. According to the denition of the slanted line integral, we obtain:
ˆ
ffl 1
Fp = f dλ − βFp (γ1s (1)) + [β0 Fp (γ (0)) + β1 Fp (γ (1))]
C 2
D + (C)
ˆ
ffl s
1
Fp = f dλ − βFp γ1,1 (1) + [β0 Fp (γ1 (0)) + βFp (γ1 (1))]
C1 2
D + (C1 )
ˆ
ffl s
1
Fp = f dλ − βFp γ2,1 (1) + [βFp (γ2 (0)) + β1 Fp (γ2 (1))] .
C2 2
D + (C2 )
67
Figure 24: An illustration to the proof of the additivity of the slanted line
integral.
(ω)
Cβ : tω−1 ≤ t ≤ tω
n o
(ω)
are uniformly tended subcurves of the given curve C. The set Cβ is
1≤ω≤n
called a division of the curve. An illustration is given in gure 25.
This is well dened beacuse the right hand-side is independent of the choice of
the division of the curve - due to the slanted line integral's additivity.
68
Figure 25: An illustration to division of a tendable curve. The subscript in-
dicates the tendency of the sub-curve, and the superscript indicates its index
amongst the other sub-curves.
Fp = − Fp .
−Cβ Cβ
´ ´ ´
Proof. Since it holds that f dλ + f dλ = f dλ, and
( )
D + Cβ D − (Cβ ) D + (Cβ ) D − (Cβ )
S
( )
D + Cβ D − Cβ
( )
S
then by considering all the cases of β, rearranging the terms and applying the
denition of the slanted line integral for Cβ , the corollary is trivially derived.
Fp = − Fp .
−C C
69
Note. Given a function f : R2 −→ R which is Lebesgue-Integrable there, and
a continuous uniformly tended curve C0 , Then the slanted line integral of its
antiderivative, F on C0 satises that:
F =0
C0
ˆ X
f dλ = αD (x) F (x) ,
x∈∇·D
D
We will now suggest to apply the denition of the slanted line integral, in order
to extend the above theorem to a non-discrete domain.
70
Figure 26: An illustration of the analogous version to Green's theorem for a
rectangle.
Proof. Let us seperate to cases, according to the type of the domain. For a
simple rectangular domain whose edges are paralel to the axes, it holds that:
Fp = Fp + Fp + Fp + Fp
BADC BA AD DC CB
1
= [+Fp (B) − Fp (A)]
2
1
+ [+Fp (D) − Fp (A)]
2
1
+ [+Fp (D) − Fp (C)]
2
1
+ [+Fp (B) − Fp (C)]
2
= Fp (B) + Fp (D) − [Fp (A) + Fp (C)] .
71
Figure 27: An illustration of the analogous version to Green's theorem for a
GRD.
minus the intergral of f on the whole GRD; in turn, this will show that:
ˆ ˆ ˆ ˆ ˆ
Fp = − Fp = − f dλ − f dλ = f dλ − f dλ = f dλ,
∂D −∂D GRD\D GRD GRD GRD\D D
as the theorem claims. Let us oberve all possible cases for points on a curve,
and see that in each case the slanted integral indeed results with the integral
of f in the area between the GRD's edge and the domain's boundary. Further,
1
let us skip the tendency coecient of
2 in the corners and relate directly to the
accumulated tendency from both sides of the corner.
• For a switch corner, the GRD's edge simply goes on (it has no corner
there), hence there is no need to add or subtract the value of Fp there
(and indeed, the tendency of such corners is zero) - for example, point A
in gure 28. The same goes for perpendicular edge points - the GRD's
edge consolidates with them, hence it has no corners there. For example,
the points in the open segments DE, EF, GH.
• For a segment between two corners, the slanted integral accumulates the
integral of f in the positive partial domain of the curve, and also adds
the weighted value of Fp in the corner - a value which is minus the ten-
dency of the segment, such that (by considering all cases) the weight
ts to the corner of the GRD's edge. Examples are shown in edges
N A, AB, BC, F G, HJ, KL, LM, and MN in gure 28.
• In a slanted edge point, the additivity of the slanted line integral assures
that the GRD's edge may pass through it or skip it. For example, in
72
gure 28: point B is a slanted edge point where the GRD's edge has a
corner, and I is a slanted edge point where the GRD's edge does not have
a corner. Since this proof is consturctive, one may use this fact to control
the computational eciency of the slanted line integral: the more slanted
edge points the GRD's edge meets, the less double integral the computer
needs to calculate on-line (assuming that Fp has been pre-processed as is
the case in computer applications).
• Acute or obtuse corners where the GRD's edge simply goes on (it has not
corner there), have a zero tendency, as we would expect. For example,
corners F, H and J in gure 28.
• Perpendicular corners consolidate with the GRD's edge, and indeed their
tendency is as in the discrete Green's theorem. For example, points D
and E in gure 28.
• If along the curve there are two adjacent slanted corners, then it is shown
via observing all cases that the areas bounded by the positive partial do-
mains of the sub-curves sometimes overlap, as is the case for the sub-curves
LM, M N in gure 28. However, once again via observing all cases, it is
shown that if an overlap indeed occurs, then the extra accumulated inte-
gral is deducted by an integral of f on a rectangle, via a linear combination
of Fp . In the examle, the integral of f in the rectangle M M 0 M 000 M 00 is
deducted via the accumulated linear combination:
ˆ
Fp (M ) − Fp (M 00 ) − Fp (M 0 ) + Fp (M 000 ) = − f dλ,
M M 0 M 000 M 00
000 000
where the terms +Fp (M ) , −Fp (M ) are articially added to the cal-
cuation: they deduct each other, while the rst is used for deducting the
integral over the rectangle, and the second one is used as the usual value
of Fp on the corner of the GRD's edge.
• In case two corners which have a zero-tendency corner between them con-
solidate, and they both have opposite weights, then this corner is dis-
regarded in the global corners of the GRD's edge (the plus/minus signs
deduct each other, as shown in point E in gure 28).
Notation. The slanted line integral of a function's local antiderivative Fp
on a curve C (where p ∈ R2 ), calculated with a given rotation θ of the coordi-
ffl θ
nates system, will be denoted by Fp .
C
73
Figure 28: An illustration to the proof of the discrete Green's theorem for a
non-discrete domain. The domain is colored in green, and its orientation is
negative. The bounding GRD is partially broken and partially consolidates
with the domain (as in the section DE ). The corners of the GRD are colored
with yellow. Let us classify the highlighted points on the green curve: A is a
switch corner, B and I are slanted edge points, C, H and J are obtuse corners,
D and E are perpendicular corners, F, G and K are acute corners, and L, M, N
are all slanted corners.
74
Figure 29: The discrete Green's theorem for a non-discrete domain, for a pos-
itively oriented curve. Since the orientation is positive, the GRD is contained
inside the domain bounded by the curve. Note that the theorem's correctness
is independent of the choice of the division of the curve: this fact is visible via
two dierent divisions of the curve, as shown above.
› ffl θ
where F ≡ Fp for any choice of the coordinates system's rotation θ and
∂D ∇·D
75
Figure 30: An illustration to the fact that the discrete green's theorem for
a non-discrete domain is independent of the rotation angle of the coordinate
system.
Figure 31: An illustration of the Line Integral for a squared curve, and an
illustration to the Slanted Line Integral for a curve that bounds a Generalized
Squared Domain (As was shown by Wang et al.'s in [7]). Note the bi-directional
relationship between the Line integral and the Slanted Line integral, whose
visualization is intuitive: In the same manner that the Line Integral on the curve
can be calculated using canceled sums of the line integral inside the curve, so
can the Slanted Line Integral on the curve be calculated using canceled sums of
the Slanted Line Integral of the boxes inside the curve.
76
Part VI
Epilogue
19 Future work
The denition of the detachment enables future work in the following elds of
research:
• Metric and Topological Spaces, Number Theory and other elds of Clas-
sical Analysis. Given a function, f : (X, dX ) → (Y, dY ) , where X, Y are
metric spaces and dX , dY are the induced measures respectively, one usu-
dY (f (x),f (x0 ))
ally cannot talk about the derivative, since the term: lim dX (x,x0 )
x→x0
dX (·)
is not always dened (we can not know for sure that the fraction
dY (·) is
well dened). However, the term
where Q is a quantization function (as is the sgn (·) function in the def-
inition of the detachment), is well dened, and suggests a classication
of a discontinuity in a point. Theorems relying on this operator may be
established.
77
• Algebra. The unusual arithmetic attributes that the detachment depicts,
whose nature is multiplicative, can be now further explored.
20 Appendix
20.1 A dierent denition to the limit process
Definition. A sequence {an }n∈N is said to have a limit L if for any > 0 there
exists an index Ñ such that for any Nmax > Ñ there exists Nmin < Nmax − 1
such that for all Nmin < n < Nmax it holds that:
|an − L| < .
Theorem. The above denition, and Cauchy's denition to the limit process,
are equivalent.
Proof. First direction. Suppose that Cauchy's denition holds for a sequence.
Hence, given an > 0 there exists a number N such that for any n > N it holds
that |an − L| < . Let us choose Ñ = N + 1. Then especially, given Nmax > Ñ ,
then Nmin = N satises the required condition.
Second direction. Suppose that the above denition holds for a sequence. We
want to show that Cauchy's denition also holds. Given > 0, let us choose
N = Ñ . We would like to show now that for any n > N it holds that
|an − L| < . Indeed, let n0 > N . Then according to the denition, if we
choose Nmax = n0 + 1, there exists Nmin < n0 such that for any n that sat-
ises Nmin < n < Nmax it holds that |an − L| < . Especially, |an0 − L| < .
Remark. Note that Cauchy's denition for limit consists of the following
argument. A sequence {an }n∈N is said to have a limit L > 0 (as
if for any
small as we desire), there exists some N () such that for any n > N it holds
that:
|an − L| < .
Consider the following alternative: There exists max such that for any 0 <
< max there exists N () with |an − L| < . The author would like to point
out that this alternative suggest a more rigorous terminology to the term as
small as we desire, and also forms a computational advantage: one knows ex-
actly what is domain from which should be chosen. It is clear that both the
denitions are equivalent, hence the proof is skipped. Following is a slightly
dierent modication of the discussed suggestion to dene the limit, where once
again the proof to its equivalency to the previously known denitions is skipped.
78
Definition. A sequence{an }n∈N is said to have a limit L if there exists
a number M > 0 such that for any m > M there exists Ñ (m) such that for any
Nmax > Ñ there exists Nmin < Nmax − 1 such that for all Nmin < n < Nmax
it holds that:
1
|an − L| < .
m
79
20.2 Source code in matlab
Algorithm 2 Source code for determimining the type of disdetachment
% DetermineTypeOfDisdetachment - given a function f and its tendency indi-
cator vector in a point x,
% will return a vector containing the classication of the function to its detach-
ment types, via
% the vector res, i.e: res(i) = 1 i the function has i-th type disdetachment in
x.
% Author: Amir Finkelstein, amir.f22@gmail.com
% Date: 16-February-2010
80
Figure 32: The NaCl structure on the left, and the NaCl dissolving in water,
on the right. Note that the structure of the NaCl resembles the structure of
the squares in the discrete Stokes' theorem, and that the process of dissolving
resembles the slanted line integral: If performed recursively, then in each itera-
tion, the slanted line integral dissolves another piece of the curve, where the
± signs appear in the slanted line integral as well.
References
[1] Paul Viola and Michael Jones. Robust Real-time Object Detection. Inter-
national Journal of Computer Vision, 2001.
[3] Yan Ke, Rahul Sukthankar and Martial Hebert. Ecient Visual Event De-
tection using Volumetric Features, International Conference on Computer
Vision, pp. 166 - 173, October 2005, volume 1.
[4] Lebesgue, Henri. "Sur lintegration des fonctions discontinues". Annales sci-
entiques de lEcole Normale Superieure 27: 361450, 1910.
[7] X. Wang, G. Doretto, T. Sebastian, J. Rittscher, and P. Tu. Shape and ap-
pearance context modeling. In Proc. IEEE Int. Conf. on Computer Vision
(ICCV), pages 18, 2007.
81
[8] Lienhart, R. &Maydt, J. (2002). An extended set of Haar-like features for
rapid object detection. In IEEE Computer Vision and Pattern Recognition
(p. I:900:903).
[9] Gilbert Labelle and Annie Lacasse. Discrete Versions of Stokes' Theorem
Based on Families of Weights on Hypercubes. In Springer Berlin / Heidel-
berg ISSN 0302-9743, 1611-3349, Volume 5810/2009.
[11] http://math.boisestate.edu/~geschke/papers/EverywhereMinMax.pdf.
82