Re: understanding formal objects in computer languages
- From: galathaea <galathaea@xxxxxxxxx>
- Date: Sat, 20 Jun 2009 14:38:25 -0700 (PDT)
On Jun 20, 8:50 am, "Tim BandTech.com" <tttppp...@xxxxxxxxx> wrote:
On Jun 20, 2:00 am, galathaea <galath...@xxxxxxxxx> wrote:
On Jun 19, 5:48 am, "Tim BandTech.com" <tttppp...@xxxxxxxxx> wrote:
On Jun 19, 12:44 am, galathaea <galath...@xxxxxxxxx> wrote:
[...]
there has been a lot of contradictory descriptions given
on formal polynomial rings
and i think it may be obscuring
the fact that a lot of good descriptions were also given
at one point you were told these weren't vectors
at about the same time another poster
was using that as an illustration
i think most of the approaches
even the oes that had really good information
probably were not the right approach to take for you
with the formal interpretations given
you will want to ask questions on meaning
and that types of investigation elicits little patience
i think a better approach
is to just point out that we can write programs
to deal with these
using the two structure building primitives
(product and union
aka
tuple and variant)
and the two type classes
(value and function)
i think you know you could write
a c++/java/c#/OCaml/whatever class
that would do everything that has been mentioned
you might start with something like (c++ here)
template <typename CoefficientBase>
class FormalPolynomial
{
public:
// construct default 0
FormalPolynomial();
// construct by coefficient list
FormalPolynomial(std::vector<CoefficientBase> const& coefficients);
// ring operations
FormalPolynomial<CoefficientBase> operator+(
FormalPolynomial<CoefficientBase> const& summand);
FormalPolynomial<CoefficientBase> operator*(
FormalPolynomial<CoefficientBase> const& multiplicand);
private:
std::vector<CoefficientBase> coefficients_;
};
i am sure you would know how to implement this
and could easily understand how to use this class
this simple little thing here
is all any of this really is
if you ask "what is X" here
the answer seems much less exciting
than some of what has been discussed
it is simply an object constructed something like
Real coefficientArray[] =
{
0.,
1.
};
std::vector<Real> coefficients(coefficientArray, coefficientArray +
2);
FormalPolynomial<Real> X(coefficients);
notice that there is no function we've defined here
that takes a FormalPolynomial and returns a Real
and we don't need anything like that
the operations on X
immediately give answers to "what is X^2?"
and similar questions on the ontology
this may seem very uninteresting
but that's the whole point:
the most powerful way of thinking about these things
is as uninteresting and simple things
whose operations you probably already understand
this is what the adjective "formal" usually means
when applied as "formal polynomials"
or "formal series"
and such
it means:
keep it simple
no extra requirements
think of them as these objects with the interface given
no other details needed
in the theory of formal series
for instance
they don't even worry about convergence
it's just sequences of coefficients
and a sequence algebra defined
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
galathaea: prankster, fablist, magician, liar
Thank you galathaea.
As I look at your code I wonder about having a class with the name
'Ring'.
This would provide sum and product operators.
Then all of this fuss would evaporate into elemental terms.
There is a ring definition which claims to be at the crux of all of
this fuss. It clearly states that its members are in the same set.
Whether they be variable or constant has nothing to do with the set
which they come from. It would seem that upon entering the polynimial
form that three new operators were introduced by insistence of x not
being a set element and that has been Fishcake's analysis which I now
see as the establishment position. Yet in that form there is no actual
use of ring operators, since the type of x is insistently denied to be
in the ring. Thus the products and sums in
a0 + a1 x + a2 x x + ...
are not ring operators. Yet the establishment position thus far has
clung to the insistence that this form as elemental does behave like a
ring within the polynomial context, and it is nearly true, but not
quite.
A slim disproof exists, for upon coming down to a single term in that
polynomial
a x
we should freely replace this value ax with two polynomials
(a) (x)
and within the the ring context with a third polynomial c
a x = c
by the closure axiom of the product operator which had been declared
on a higher form than A so named 'the polynomial ring A[X]'. If this
is not true then the value under scrutiny is not a ring and so the
usage of the term ring was not only polluted by the formal
interpretation on x, but it was destroyed. The polynomial ring is a
misnomer when interpreted the 'formal' way.
Instead witness that upon specifying a set A then all elements are
specified. Thus the ring definition alone is suitable to building up
polynomials or any other structure you wish of products and sums.
Whether elements are variable or constant is about implementation
which has not occurred yet since nothing has been done with the
construction.
creating the class Ring is definitely the right starting point
but it is often convenient to make Ring an interface
and implement different rings in different manners
because there are often "more convenient"
or "more optimised"
means of representing the data of certain types of rings
still
the idea is the same
so you could make a class RealRing
which could even just be an alias for the previous Real
mentioned as coefficients
and you could make a Ring-derived class Complex
and many other such rings
now let's define a simple "adapter class" concept
for any Ring r
where r may be any type derived from Ring
so we're looking at a polymorphic form
let's apply the earlier "FormalPolaynomial" template
do you see how the class FormalPolynomial<Real>
has different structure than Real
however
it is clear there is a canonical inclusion
canon: Real --> FormalPolynomial<Real>
given by r |-> (r, 0, 0, 0, ...)
(or the finite rep (r) or whatever is your fancy)
the additional structure of FormalPolynomial<>
over some base ring
is that we have added this unbounded dimenional vector space
(but no element of infinite dimension)
now
instead of talking about single elements of the base field
we can build an algebra of ordered collections
or an algebra of finite sequences of symbols
still
i am sure that you can see
in almost any computer language with a type system
the construction of a library would make
Real and FormalPolynomial<Real> two distinct types of values
the class doesn't even have an internal representation of X
at least none with operational meaning
(it should just be an index into a structure like a string)
in Real
we have things like r1 . r2 = r3
in FormalPolynomial<Real>
there are things like (r0, r1) . (s0, s1, s2) =
(r0 . s0, r1 . s0 + r0 . s1, r0 . s2 + r1 . s1,
r1 . s2)
in several different senses
this can be seen as "adjoining a transcendent" to a ring
and similar extension interpretations
but you can see the added structure
Well here we go with the magic again in your quotes
adjoining a transcendent
which is merely a fancy term for a product which does not fit the ring
nomenclature which is where product was introduced formally. Thus
while you all couch your terminology on a 'formal' polynomial the
usage of this interpretation is exactly breaking the formality which
the ring created. You've created and immediately destroyed that
principle by this usage.
it's the same thing that happens
when a software engineer gets an assignment
"hey, we need to add functionality F to class X"
sure it violates the old guarantees
but you try to do the addition in such a way
that there are no broken promises from before
because you don't want to have to change other code loci
usually this means "orthogonal extension"
the mathematicians have formalised this in many ways
and one of them is adding transcendent elements to rings
which is basically the "polynomialisation operation"
this "formal" element X
is the basis for the process
of looking up coefficients in the sequence
a software engineer does this
by using a dynamic container for the coefficients
Again, coming from the ring interpretation multiple types are not
accomodated. For instance the complex number as composed of real
numbers does not fit the ring nomenclature due to the seed of its
construction
b i
where b is defined as a real and i is not real. This is a unit vector
product and this product does not fit the ring nomenclature. This will
lead to your usage of a 2D form
( 0, b )
in order to remedy the situation. But this form is on two sets, not
one and so it does not fit the ring nomenclature. Upon encapsulating
these two-typed numbers into a singular element form such as
z1 z2 = z3
z1 + z2 = z4
then the ring definition becomes compatible, but carrying around the
two-form is a substructure that contaminates the ring requirements if
opened up.
it is a part of the laziness of the language
which i think is more of an engineering trait
many writers will skip the formality of the "marking of elements"
as i mentioned in passing earlier
something i called the "canonical inclusion"
say a ring class takes r bytes of data to describe a member of the
ring
(in other words say each instance of some Ring class is r bytes large)
graphically: [ r bytes ]
inside FormalPolynomial
it stores the data of each element as a dynamic container of r byte
locations
possibly with some container management data as well
graphically: [ container ] [ r bytes ] [ r bytes ] ... [ r bytes ]
the "canonical inclusion" simply "names"
elements of FormalPolynomial type
using names from the base ring type
the container with only one element
[ container ] [ r bytes ]
behaves in the exact same way as the base element sitting in that lone
cell
in the vector representation of FormalPolynomial
(a1) # (a2) = (a1 + a2)
(a1) * (a2) = (a1 . a2)
respect the same arithmetic relationships as the base ring
..
so...
what all of this means is
mathematicians feel lazy writing something like
a x instead of (a) x
or related notation to indicate "image of naming map"
it is because it isn't really necessary
as you mention
the parsing would fail
and as computer linguists often take advantage
parse failures are places where a language may be extended
adding anything from notational conventions to complete new
behaviors
here it was simple notational convenience
adding something like
parseFail(condition72B, failedNode): interpret failedNode ->
(failedNode)
there is no ambiguity introduced
those are encountered by linguistic additions that parse _correctly_
with some other semantics
the point about looking at it like this
as program structures
is because the dynamics of most mathematical discourse
often has prediction hindered by loose semantics
but as one becomes comfortable with a language
and many of the modern languages are often good domain fits
the ontology becomes very predictable
you get a better understanding of the evolution of it's types
i've seen your web site and resume
so i know you understand how to implement this
can you see how Real works from these loose descriptions?
how FormalPolynomial works?
how they are different types?
Yes, exactly. They are claimed to be different types and so they do
not fit the ring method.
The product in use under this interpretation is outside of the ring
nomenclature since it mimics the unit vector format. Yet it is so easy
to see that this inconsistency need not exist. From the ring we can
freely construct the polynomial and maintain integrity. So long as the
form remains abstract then there is no trouble. Upon specifying a real
valued coefficient however then the conflict ensues. The ring
definition is the core principle here, not the polynomial. The
insistence on respecting the polynomials abstract form while
collapsing its coefficients is inconsistent with the ring terminology
and so you land in terminology like 'transcendent' which is entirely
unmathematical just as Connely's usage of "variable" or
"symbol" (quotes his, not mine).
Are we not fine working with variables as symbols already without the
need to put them in quotes?
Whatever happened here is a sad thing. One of the high priests made a
misstep and decided to never own it. Now that misstep has propagated
and the proof of a religion within mathematics is established. This
causes me to nearly accept religion, except that there is no principal
of truth there. The best means of arriving at truth is not via
mimicry, yet mimicry is exactly what all of you purvey here. Academia
is a lost cause so long as it works like this.
the same proof shows the religiosity of software engineers
it is called the big ball of mud pattern
http://www.laputan.org/mud/
it always happens when nomenclatures have to be decided
without years of dedicated thought
you see
tim
everyone is shooting from the hip here
and everyone is riding waves of epiphanies
trying to get it all out
and see what sense it makes
when most people publish proofs
they try to capture the way they thought of things
but when it doesn't matter what symbolic choice is made
often tradition and chance enter into it
particularly when hurried to get the new ideas out
because it is stalling investigation elsewhere
and when software engineers are racing against the deadline
and trying to get a module implemented
the litany of derivations requires some simple technique
something familiar and easy to access
in which to automate the long task
all large intellectual projects
accumulate the mud
of the many varying arbitrary choices
of all the past engineers
refactoring is always an important skill
Noone here other than
Leland has managed to wander off the path that has already been laid.
Why not consider some other ground? I know that you galathaea are a
master of the polynomial, but I also know you to be openminded. I
guess the simplest question to focus down on is:
Which is more fundamental, the ring or the polynomial?
looking at the computer science model
the question is:
which is more fundamental
BaseRing
or
FormalPolynomial<BaseRing>
in this particular implementation
if fundamental means what i think you may mean here
BaseRing can be used on it's own
FormalPolynomial<> can be defined without reference to BaseRing
but it cannot be instantiated without reference to the base
so BaseRing is more fundamental here?
but
as a fellow engineer
i know you know we don't have to implement things that way
we could implement our own FormalPolynomialZ2 class
that doesn't refer to the generic form or the base
and it might even be able to be optimised better
and all sorts of other things
and maybe
someone programming after a terrible head injury
had implemented Z2 as a class where they couldn't get the product to
work right
so they kept adding and adding to the algorithm
until it was 3000 lines long and finally worked for all four cases
is that more fundamental?
We can build polynomials from rings, but we cannot build rings from
polynomials so long as X is untouchable. This is what you all have
created: a caste of untouchables. Then you will turn around and wipe
them away without a care for what you so carefully layed down as law.
Within a set of laws a form of truth is claimed but whether that form
is accurate must be left open. Here I have provided plenty of evidence
taking the law of the ring as the first law. I do accept this first
law fully, whereas you have brushed it aside yet maintain its
terminology so as to keep up appearances. You do claim to be a
prankster, fablist, magician, and liar and here is a fine low down
instance. Of course you understand I am not slinging an insult at you
emotionally here. I would simply ask that if we are in a mathematical
system that such conflicts ought to work out via logically constructed
arguments. I have pointed directly at the flaw. Noone here has
bothered to admit that the product of the ring transcends the product
of the polynomial. Instead they go over to make a fresh symbol '#' as
a new product operator without any regard for the ring.
think of X like
"marks the 1st location in the container"
it's an indeXer
that's all
X^2 "marks the 2nd location in the container"
when looking at basis elements in vector spaces
we have for arbitrary vector v
dim(v)
---
\
v = / v e
--- j j
j=1
and when looking at an element that is a formal polynomial
for arbitrary polynomial p
deg(p)
---
\ j
p = / p x
--- j
j=0
ultimately
it is just a shorthand for selecting coefficients
which is all that happens
when this is implemented in code
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
galathaea: prankster, fablist, magician, liar
.
- Follow-Ups:
- Re: understanding formal objects in computer languages
- From: Tim BandTech.com
- Re: understanding formal objects in computer languages
- References:
- Re: Understanding the quotient ring nomenclature
- From: Tim BandTech.com
- Re: Understanding the quotient ring nomenclature
- From: Fishcake
- Re: Understanding the quotient ring nomenclature
- From: Tim BandTech.com
- Re: Understanding the quotient ring nomenclature
- From: Leland McInnes
- Re: Understanding the quotient ring nomenclature
- From: Tim BandTech.com
- understanding formal objects in computer languages
- From: galathaea
- Re: understanding formal objects in computer languages
- From: Tim BandTech.com
- Re: understanding formal objects in computer languages
- From: galathaea
- Re: understanding formal objects in computer languages
- From: Tim BandTech.com
- Re: Understanding the quotient ring nomenclature
- Prev by Date: Limit involving sum of sin(sqrt(i))
- Next by Date: Re: Problems with the News Group
- Previous by thread: Re: understanding formal objects in computer languages
- Next by thread: Re: understanding formal objects in computer languages
- Index(es):
Relevant Pages
|