| Deutsch English Français Italiano |
|
<vj7i8f$11g01$2@solani.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feeds.phibee-telecom.net!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mild Shock <janburse@fastmail.fm> Newsgroups: comp.lang.prolog Subject: Re: A Timeless Confluence [Term Rewriting] (Was: Can we do this with ancestral cuts or something?) Date: Mon, 9 Dec 2024 21:00:17 +0100 Message-ID: <vj7i8f$11g01$2@solani.org> References: <vj6rmq$clr4$1@dont-email.me> <vj6u0o$l219$1@solani.org> <vj73f8$clr4$2@dont-email.me> <vj798o$clr4$5@dont-email.me> <vj7i5p$11g01$1@solani.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 9 Dec 2024 20:00:15 -0000 (UTC) Injection-Info: solani.org; logging-data="1097729"; mail-complaints-to="abuse@news.solani.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.19 Cancel-Lock: sha1:WWcuuLciEvjhivOerAr3xA/H/J4= In-Reply-To: <vj7i5p$11g01$1@solani.org> X-User-ID: eJwNyskBwCAIBMCWcIHVlIMc/ZcQP/MaVy7mNjrNxycb63bv/D7bEKEoDsbuTABdwtBAis9tVanlWc9T84YHf1t4FjQ= Bytes: 3887 Lines: 84 Ok Confluence does indeed ring a bell. Lets show Declarative (What) versus Procedural (How) in @emiruz example, as a rewriting problem. Lets permit that we write the input as [1,2,a,4,5, b,c,8,9,10] and then have rewriting rules [a->3,b->6, c->7,d->8] applied, by this little Declarative (What) code: step(L,R) :- nth1(K,L,a,H), nth1(K,R,3,H). step(L,R) :- nth1(K,L,b,H), nth1(K,R,6,H). step(L,R) :- nth1(K,L,c,H), nth1(K,R,7,H). step(L,R) :- nth1(K,L,d,H), nth1(K,R,8,H). find(L,L) :- \+ step(L,_). find(L,R) :- step(L,H), find(H,R). Each derivation is a Procedural (How) execution: ?- find([1,2,a,4,5,b,c,8,9,10],X). X = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; X = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; X = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Etc.. Can we count the number of Hows to solve the What? ?- aggregate_all(count, find([1,2,a,4,5,b,c,8,9,10],X), C). C = 6. So there are 6 different Procedures that tell us which steps to exactly use when, to solve the Declaratively given problem which leaves open when to use each step. Mild Shock schrieb: > A Timeless Confluence > > By the banks of thought where rivers entwine, > Emmy Noether walked through a realm divine. > Her algebra wove the fabric of laws, > While echoes of logic gave her pause. > > There stood Michael Kohlhase, a seeker of form, > Shaping machines through a digital storm. > “Madame,” he began, with respect in his tone, > “Your ideals still guide what we’ve come to own. > > Noetherian rings, your towering art, > Anchor the systems of which I’m a part. > In rewriting paths, your truth remains, > Simplifying chaos, dissolving chains.” > > Emmy smiled, her brilliance aglow, > "Through eras, the seeds of knowledge grow. > Yet tell me, dear traveler, in your machine’s frame, > Do ideals endure, or fade like a flame?” > > Michael replied, “Your vision holds, > In logic’s rewrite, it gently unfolds. > Past meets the present where structures align, > A confluence of thought, eternal, divine.” > > And so they stood, two eras combined, > Bound by the currents of the infinite mind. > > https://en.m.wikipedia.org/wiki/Emmy_Noether > > https://en.m.wikipedia.org/wiki/Michael_Kohlhase > > Julio Di Egidio schrieb: >> On 09/12/2024 16:47, Julio Di Egidio wrote: >> >>> term rewriting also can do the trick and quite more simply so... >> >> I take that back, too. I cannot find a way out of ancestral cuts in >> the recursive case. Some term rewriting could rather be useful *in >> conjunction* with that `scut`, since that as written messes up with >> the stack trace... Anyway, that's another story. >> >> -Julio >> >