
Re: Can addition be defined in terms of multiplication?
Posted:
Aug 18, 2013 6:21 PM


TRACE + [s 0] [s [s 0]] ANS ?
HEAD 1 + X Y Z TAIL 1 x n^ X n^ Y n^ Z x n^ [ s 0 ] n^ [ s s 0 ] n^ Z HEAD 1 x [ n^ X ] [ n^ [ s Y ] ] [ n^ [ s Z ] ] TAIL 1 x n^ X n^ Y n^ Z x n^ [ s 0 ] n^ [ s 0 ] n^ Z HEAD 1 x [ n^ X ] [ n^ [ s Y ] ] [ n^ [ s Z ] ] TAIL 1 x n^ X n^ Y n^ Z x n^ [ s 0 ] n^ [ 0 ] n^ Z HEAD 1 x [ n^ X ] [ n^ 0 ] [ n^ X ] MATCH TRUE 1 MATCH TRUE 1 MATCH TRUE 1 MATCH
+ [s 0] [s [s 0]] ANS ?
ANS = s s s 0
OK, correct trace!
Herc  www.phpPROLOG.com

