oldk1331 wrote:
>
> On Sun, Dec 16, 2018 at 3:07 AM Waldek Hebisch
> wrote:
> > Well, in FriCAS tree is an aggregate. And empty aggregate
> > is always legal. In fact, empty aggregate is a generic
> > way to start building an aggregate. So disallowing it
> > does not look right.
>
> For Tree
On Sun, Dec 16, 2018 at 3:07 AM Waldek Hebisch wrote:
> Well, in FriCAS tree is an aggregate. And empty aggregate
> is always legal. In fact, empty aggregate is a generic
> way to start building an aggregate. So disallowing it
> does not look right.
For Tree, can I commit the patch with:
oldk1331 wrote:
>
> On 12/11/18 3:55 AM, Waldek Hebisch wrote:
> > oldk1331 wrote:
> >>
> >> This patch changes the Rep of Tree from
> >> Union(node:Record(value: S, args: List %),empty:"empty")
> >> to
> >> Record(val : S, args: List %)
> >> and uses "NIL$Lisp" to represent empty tree.
>
oldk1331 wrote:
>
>
> > Sorry that I did not comment earlier: this kind of change is
> > very dangerous. Namely, it can work quite nice in testing
> > and then lead to error say 3 years later. The point is
> > that there is correspondence between FriCAS types and
> > Lisp representation. Part
Ralf Hemmecke wrote:
>
> > Yes, it is debatable, as we can see in
> > https://en.wikipedia.org/wiki/Tree_(data_structure)
>
> Since you refer to wikipedia... why not using this definition:
> https://en.wikipedia.org/wiki/Tree_(data_structure)#Type_theory
> In orther words, we introduce forests.
>
> Yes, it is debatable, as we can see in
> https://en.wikipedia.org/wiki/Tree_(data_structure)
Since you refer to wikipedia... why not using this definition:
https://en.wikipedia.org/wiki/Tree_(data_structure)#Type_theory
In orther words, we introduce forests.
Shouldn't it be possible to define F
On 12/11/18 1:55 PM, Ralf Hemmecke wrote:
>> Another way to look at this "use NIL to represent empty tree"
>> problem:
>
>> We disallow the existence of empty tree.
>>
>> 1. Empty tree is not required by the definition of tree.
>> 2. You can not construct an empty tree from existing
>> and futu
> Another way to look at this "use NIL to represent empty tree"
> problem:
> We disallow the existence of empty tree.
>
> 1. Empty tree is not required by the definition of tree.
> 2. You can not construct an empty tree from existing
> and future operations of Tree:
>
> For example, "delete a no
> Sorry that I did not comment earlier: this kind of change is
> very dangerous. Namely, it can work quite nice in testing
> and then lead to error say 3 years later. The point is
> that there is correspondence between FriCAS types and
> Lisp representation. Part of this correspondence are
> k
On 12/11/18 3:55 AM, Waldek Hebisch wrote:
> oldk1331 wrote:
>>
>> This patch changes the Rep of Tree from
>> Union(node:Record(value: S, args: List %),empty:"empty")
>> to
>> Record(val : S, args: List %)
>> and uses "NIL$Lisp" to represent empty tree.
>>
>> Before this patch,
>>
>> (1)
oldk1331 wrote:
>
> This patch changes the Rep of Tree from
> Union(node:Record(value: S, args: List %),empty:"empty")
> to
> Record(val : S, args: List %)
> and uses "NIL$Lisp" to represent empty tree.
>
> Before this patch,
>
> (1) -> tree [1,2,3] pretend SEX
>
>(1) (0 1 (0 2) (0
This patch changes the Rep of Tree from
Union(node:Record(value: S, args: List %),empty:"empty")
to
Record(val : S, args: List %)
and uses "NIL$Lisp" to represent empty tree.
Before this patch,
(1) -> tree [1,2,3] pretend SEX
(1) (0 1 (0 2) (0 3))
And after:
(1) -> tree [1,2,3] pre
12 matches
Mail list logo