[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 109 KB, 532x741, 1488576.main_image.jpg [View same] [iqdb] [saucenao] [google]
9731567 No.9731567[DELETED]  [Reply] [Original]

Is summation the for loop of the math language ?

>> No.9731569

Is OP the faggot of the internet?

>> No.9731896

>>9731567
No, set builder notation is the for loop, retard.

>> No.9731933
File: 9 KB, 254x25, Screen Shot 2018-05-10 at 21.12.20.png [View same] [iqdb] [saucenao] [google]
9731933

The Y-combinator is

https://en.wikipedia.org/wiki/Fixed-point_combinator

Although if you want a more pure context, then the big thing that needs to be added to a language is the mu operator
https://en.wikipedia.org/wiki/%CE%9C_operator

>> No.9732089

The [math]\forall[/math] symbol, of course.

For example, something like

[math]X_i \gets i^2\ \ \ \ \ \forall i = 1,\ldots,10[/math]

is equivalent to something like

for(size_t i = 1; i <= 10; i++)
[math]\ \ \ \ \ \ [/math]X[i] = i * i;

>> No.9732108
File: 86 KB, 540x675, blolip.jpg [View same] [iqdb] [saucenao] [google]
9732108

>>9732089
Not really, though.
Something which recursively depends on the last execution like

int n = 0;
for(int i = 1; i <= 10; i++)
n = n * i;

isn't captured by \forall but can be realized with a fixed point Y. Of course, I'm aware that I already let the distrinction between math and language theory slide - as it should - and the functional programming concepts just happen to have better semantics. We'd want to look at something with for loops, like C, and construct e.g.

https://en.wikipedia.org/wiki/Denotational_semantics

But I'm not sure if that works with procedural languages. ML (where Haskell is derived from) has formal semantics, so that's the closest I could get OP.