🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #5

Cont. Now with Integers (Was: An elementary proof or pi irrationality = 2 [Natural Intelligence])

#5
From: Mild Shock
Date: Fri, 09 Oct 2026 18:22
174 lines
5905 bytes
Hi,

Now with integers, to really produce some results:

% pi2(+Integer, +Rational, -Rational)
pi2(0, P/Q, R/Q) :- !, R is P-3*Q.
pi2(N, P/Q, S) :-
    H is 6*P+(2*N-1)^2*Q,
    M is N-1,
    pi2(M, H/P, S).

Now I see:

?- between(10,20,N), pi2(N,6/1,X), Y is X, write(N-X-Y), nl, fail; true.
10-475113942765/151242416325-3.1414067184965018
11-11922290683065/3794809718700-3.1417360992606653
12-322869019821075/102776096548125-3.141479689004255
13-9388645795842075/2988412653476250-3.1416831892077552
14-291703390224616125/92854250304440625-3.1415189855952756
15-9646071455650881825/3070380543400170000-3.141653394197426
16-338203386739761387075/107655217802968460625-3.1415419859977827
17-12533792135642378629875/3989575718580595893750-3.1416353566793886
18-489501901570061970946125/155815096120119939628125-3.1415563302845726
19-20095772843114788169975625/6396619735457555416312500-3.1416238066678384
20-865107029346752986828909875/275374479611447760672253125-3.141565734658547
true.

And further:

% roth2(+Integer, -Float)
roth2(N, X) :-
    pi2(N, 6/1, A/_),
    M is N+1,
    pi2(M, 6/1, B/_),
    X is 1+msb(B)/msb(A).

Now I see, no more alternating:

?- between(10,20,N), roth2(N,X), write(N-X), nl, fail; true.
10-2.1315789473684212
11-2.116279069767442
12-2.104166666666667
13-2.0943396226415096
14-2.086206896551724
15-2.079365079365079
16-2.0735294117647056
17-2.0684931506849313
18-2.0769230769230766
19-2.0595238095238093
20-2.056179775280899
true.

And for big values pretty much looks like 2+C/N:

?- roth2(1000,X).
X = 2.0011523151058035.
?- roth2(10000,X).
X = 2.000116750597374.
?- roth2(100000,X).
X = 2.0000111335844575.

Bye

BTW, because of the way I compute
the continued fraction, it takes some time:

?- time(roth2(100000,X)).
% Zeit 11258.941 ms, Benutzer 100 %, Lips 53 k
X = 2.0000111335844575.

Mild Shock schrieb:
> Hi,
> 
> Take this continued fraction:
> 
> % pi(+Integer, +Float, -Float)
> pi(0, R, S) :- !, S is R-3.
> pi(N, R, S) :-
>     H is 6+(2*N-1)^2/R,
>     M is N-1,
>     pi(M, H, S).
> 
> Nice little corridor for pi:
> 
> ?- between(10,20,N), pi(N,6,X), write(N-X), nl, fail; true.
> 10-3.1414067184965013
> 11-3.1417360992606653
> 12-3.141479689004255
> 13-3.141683189207755
> 14-3.141518985595275
> 15-3.1416533941974265
> 16-3.141541985997783
> 17-3.141635356679389
> 18-3.1415563302845726
> 19-3.1416238066678384
> 20-3.1415657346585473
> true.
> 
> We can als compute roth:
> 
> % roth(+Integer, -Float)
> roth(N,X) :-
>     pi(N, 6, A),
>     M is N+1,
>     pi(M, 6, B),
>     X is 1+log(B)/log(A).
> 
> Now we have a corridor for 2:
> 
> ?- between(10,20,N), roth(N,X), write(N-X), nl, fail; true.
> 10-2.0000915947815723
> 11-1.9999287043438398
> 12-2.0000565883650765
> 13-1.999954341912648
> 14-2.000037375237465
> 15-1.9999690217963195
> 16-2.000025963563826
> 17-1.9999780257693796
> 18-2.000018763059092
> 19-1.9999838523285578
> 20-2.000013997167758
> true.
> 
> How proof limsup is 2?
> 
> Proof Sketch:
> 
> Lets check the formula 1+log(An+1)/log(An) .
> If An+1 < pi and An > pi. We know that
> 1+log(An+1)/log(An) < 1+log(pi)/log(An)
> and 1+log(An+1)/log(An) < 1+log(An+1)/log(pi).
> 
> So we get limsup 1+log(An+1)/log(An) =<
> limsup 1+log(An+1)/log(pi) = 1+log(pi)/log(pi) = 2.
> But since pi is irrational the lowerbound
> 
> is anyways 2, so that Liouvielle-Roth
> irrationality measure = 2 follows.
> 
> Q.E.D.
> 
> Bye
> 
> Mild Shock schrieb:
>> Hi,
>>
>> OpenAI has announced enhancing their Math Swarms
>> by an interpretability accelerator prompt recently
>> discovered in a Terrence Tao workshop.
>>
>> So they are now takling:
>>
>> Mathematician W. Hugh Woodin Explains Continuum Hypothesis
>> https://www.youtube.com/watch?v=ZC7wglkBWMM
>>
>> Infinite fun with infinite worlds
>> https://ethz.ch/en/news-and-events/eth-news/news/2020/08/infinite-fun-with-the-infinite-worlds.html 
>>
>>
>> A partial Lean 4 formalization is already in
>> the making. But the hurdles are high. Some
>> speaker of the effort said:
>>
>> The computer might find a new tamagochi knottheory
>> lemma, which will then allow SpaceX to fly to
>> workholes, but the hurdle will be hight that
>>
>> a single human mathematician mind might
>> ingest, understand and interpret it.
>>
>> Bye
>>
>>
Technical Details
Message-ID: <11abbds$170ap$1@solani.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
References: <10c46ti$mf1d$1@solani.org> <10ei6rc$1efa$1@solani.org> <10ej57h$227u$2@solani.org> <10srd0a$14g17$2@solani.org> <10sriht$13app$2@solani.org> <10srjsg$13bfs$1@solani.org> <10ssije$13umd$3@solani.org> <11478b2$fv28$2@solani.org> <119omnu$pkou$2@solani.org> <11ab8sg$16ucq$1@solani.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Mild Shock <janburse@fastmail.fm>
Newsgroups: sci.logic,comp.lang.prolog,sci.math
Subject: Cont. Now with Integers (Was: An elementary proof or pi irrationality
 = 2 [Natural Intelligence])
Date: Fri, 9 Oct 2026 20:22:52 +0200
Message-ID: <11abbds$170ap$1@solani.org>
References: <10c46ti$mf1d$1@solani.org> <10ei6rc$1efa$1@solani.org>
 <10ej57h$227u$2@solani.org> <10srd0a$14g17$2@solani.org>
 <10sriht$13app$2@solani.org> <10srjsg$13bfs$1@solani.org>
 <10ssije$13umd$3@solani.org> <11478b2$fv28$2@solani.org>
 <119omnu$pkou$2@solani.org> <11ab8sg$16ucq$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Oct 2026 18:22:52 -0000 (UTC)
Injection-Info: solani.org;
	logging-data="1278297"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:U6xpochxwJMJr7TWXsMA3/TkJKM=
In-Reply-To: <11ab8sg$16ucq$1@solani.org>
X-User-ID: eJwNydsBADEEBMCWBEuUIx79l3A3vwOxY+VqMMViZ0aa7lsgbk+hppsJFfLuUTfKp5xBqRr/GGFbUsDeUsYfcoYVvg==