<s>
Like	O
logic	B-Language
programming	I-Language
,	O
narrowing	B-Application
of	I-Application
algebraic	I-Application
value	I-Application
sets	I-Application
gives	O
a	O
method	O
of	O
reasoning	O
about	O
the	O
values	O
in	O
unsolved	O
or	O
partially	O
solved	O
equations	O
.	O
</s>
<s>
Where	O
logic	B-Language
programming	I-Language
relies	O
on	O
resolution	O
,	O
the	O
algebra	O
of	O
value	O
sets	O
relies	O
on	O
narrowing	O
rules	O
.	O
</s>
<s>
Unlike	O
logic	B-Language
programming	I-Language
,	O
narrowing	B-Application
of	I-Application
algebraic	I-Application
value	I-Application
sets	I-Application
makes	O
no	O
use	O
of	O
backtracking	B-Algorithm
.	O
</s>
<s>
The	O
approach	O
is	O
also	O
similar	O
to	O
the	O
use	O
of	O
constraints	B-Application
in	O
constraint	B-Application
logic	I-Application
programming	I-Application
,	O
but	O
without	O
the	O
logic	O
processing	O
basis	O
.	O
</s>
<s>
Early	O
programming	O
languages	O
were	O
imperative	B-Application
.	O
</s>
<s>
Functional	B-Language
languages	I-Language
based	O
on	O
lambda	B-Language
calculus	I-Language
allow	O
this	O
mathematical	O
approach	O
to	O
programming	O
.	O
</s>
<s>
Functional	B-Language
languages	I-Language
developed	O
by	O
implementing	O
lazy	O
evaluation	O
,	O
and	O
allowing	O
functions	O
to	O
be	O
passed	O
as	O
parameters	O
.	O
</s>
<s>
Lazy	O
evaluation	O
is	O
an	O
essential	O
feature	O
of	O
modern	O
functional	B-Language
programming	I-Language
languages	I-Language
such	O
as	O
Haskell	B-Language
.	O
</s>
<s>
Haskell	B-Language
is	O
the	O
latest	O
in	O
a	O
series	O
of	O
languages	O
based	O
on	O
lambda	B-Language
calculus	I-Language
and	O
let	B-Application
expressions	I-Application
.	O
</s>
<s>
These	O
languages	O
provide	O
rich	O
functionality	O
through	O
lazy	O
evaluation	O
,	O
and	O
a	O
polymorphic	B-Application
type	I-Application
system	I-Application
using	O
type	B-Algorithm
inference	I-Algorithm
.	O
</s>
<s>
Functional	B-Language
programming	I-Language
languages	I-Language
also	O
naturally	O
support	O
higher-order	B-Language
functions	I-Language
.	O
</s>
<s>
Logic	B-Language
programming	I-Language
based	O
on	O
Resolution	O
developed	O
alongside	O
functional	B-Language
programming	I-Language
.	O
</s>
<s>
Logic	B-Language
programming	I-Language
is	O
a	O
form	O
of	O
relational	B-Language
programming	I-Language
that	O
makes	O
deductions	O
about	O
values	O
.	O
</s>
<s>
Constraint	B-Application
logic	I-Application
programming	I-Application
extends	O
logic	B-Language
programming	I-Language
,	O
by	O
supporting	O
constraints	B-Application
.	O
</s>
<s>
Constraint	B-Application
logic	I-Application
programming	I-Application
languages	O
such	O
as	O
ECLiPSe	B-Application
provide	O
the	O
ability	O
to	O
solve	O
complex	O
logic	O
problems	O
.	O
</s>
<s>
However	O
ECLiPSe	B-Application
is	O
not	O
lazy	O
.	O
</s>
<s>
Logic	B-Language
programming	I-Language
languages	I-Language
,	O
although	O
they	O
have	O
greater	O
deduction	O
abilities	O
,	O
never	O
gained	O
the	O
power	O
and	O
flexibility	O
of	O
functional	B-Language
languages	I-Language
.	O
</s>
<s>
Narrowing	O
is	O
a	O
technique	O
that	O
allows	O
logical	O
deduction	O
,	O
with	O
the	O
flexibility	O
of	O
functional	B-Language
languages	I-Language
.	O
</s>
<s>
No	O
back	B-Algorithm
tracking	I-Algorithm
is	O
required	O
in	O
the	O
use	O
of	O
narrowing	O
.	O
</s>
<s>
Evaluation	O
proceeds	O
as	O
for	O
a	O
functional	B-Language
language	I-Language
,	O
combining	O
combinations	O
of	O
values	O
in	O
value	O
sets	O
,	O
with	O
narrowing	O
rules	O
eliminating	O
impossible	O
values	O
from	O
the	O
sets	O
.	O
</s>
<s>
If	O
further	O
conditions	O
or	O
constraints	B-Application
are	O
added	O
to	O
x	O
we	O
would	O
like	O
to	O
consider	O
each	O
value	O
to	O
see	O
if	O
it	O
matches	O
the	O
constraint	O
.	O
</s>
<s>
If	O
the	O
constraints	B-Application
are	O
applied	O
in	O
the	O
order	O
left	O
to	O
right	O
,	O
</s>
<s>
If	O
the	O
constraints	B-Application
are	O
applied	O
in	O
the	O
order	O
right	O
to	O
left	O
,	O
</s>
<s>
A	O
let	B-Application
expression	I-Application
may	O
be	O
used	O
to	O
represent	O
a	O
value	O
that	O
is	O
a	O
member	O
of	O
a	O
set	O
,	O
</s>
<s>
The	O
let	B-Application
expression	I-Application
allows	O
the	O
constraint	O
be	O
represented	O
in	O
an	O
expression	O
.	O
</s>
<s>
Under	O
function	O
application	O
,	O
of	O
one	O
let	B-Application
expression	I-Application
to	O
another	O
,	O
</s>
<s>
But	O
a	O
different	O
rule	O
applies	O
for	O
applying	O
the	O
let	B-Application
expression	I-Application
to	O
itself	O
.	O
</s>
<s>
The	O
let	B-Application
expression	I-Application
does	O
not	O
restrict	O
the	O
scope	O
of	O
the	O
variable	O
x	O
,	O
so	O
x	O
is	O
the	O
same	O
variable	O
in	O
the	O
two	O
let	B-Application
expressions	I-Application
.	O
</s>
<s>
There	O
appears	O
no	O
simple	O
rule	O
for	O
combining	O
let	B-Application
expressions	I-Application
.	O
</s>
<s>
As	O
a	O
let	B-Application
expression	I-Application
this	O
becomes	O
,	O
</s>
<s>
Both	O
R	O
and	O
x	O
must	O
be	O
included	O
in	O
the	O
dependent	O
condition	O
,	O
because	O
R	O
identifies	O
the	O
value	O
set	O
to	O
which	O
the	O
dependent	O
condition	O
belongs	O
,	O
and	O
x	O
provides	O
the	O
variable	O
used	O
to	O
carry	O
the	O
value	O
in	O
the	O
let	B-Application
expression	I-Application
.	O
</s>
<s>
Narrowing	O
allows	O
the	O
elimination	O
of	O
values	O
that	O
do	O
not	O
satisfy	O
a	O
variable	O
's	O
constraints	B-Application
.	O
</s>
<s>
Considered	O
as	O
the	O
basis	O
for	O
an	O
algorithm	O
for	O
solving	O
equations	O
,	O
this	O
narrowing	O
gives	O
a	O
set	O
of	O
values	O
consistent	O
with	O
the	O
constraints	B-Application
on	O
a	O
variable	O
.	O
</s>
<s>
Define	O
the	O
gset	O
of	O
x	O
to	O
be	O
the	O
set	O
of	O
values	O
that	O
satisfy	O
the	O
constraints	B-Application
on	O
x	O
.	O
</s>
<s>
This	O
definition	O
depends	O
on	O
knowing	O
the	O
expression	O
E	O
,	O
which	O
is	O
the	O
condition	O
giving	O
all	O
the	O
constraints	B-Application
on	O
x	O
.	O
</s>
<s>
Imagine	O
that	O
what	O
we	O
know	O
of	O
as	O
mathematics	O
is	O
actually	O
implemented	O
by	O
a	O
meta	B-Application
function	I-Application
called	O
math	O
.	O
</s>
<s>
math	O
takes	O
an	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
and	O
gives	O
meaning	O
to	O
the	O
variables	O
and	O
mathematical	O
structures	O
and	O
adds	O
existential	O
quantifiers	O
for	O
variables	O
not	O
explicitly	O
quantified	O
.	O
</s>
