Live CEOing Ep 748: Language Design Review of Calculus & Algebra Features for 14.0 continued

A design-review transcript (YouTube Live CEOing Ep 748) of internal discussion led by Stephen Wolfram with Roger, Adam, Subha and others about calculus and algebra language-design for version 14.0. Major themes: naming and presentation of finite-field types; matrix operations and structured/symmetric/unitary matrices, and how to promote/recognize structured matrices (correlation, rotation, permutation); array representations (lists, packed arrays, sparse arrays, structured arrays) and possible future unified matrix/array wrapper and printing/elision/iconization for large matrices; handling of 'around' (statistical) and interval arithmetic in linear algebra (dependence problem, enclosure vs. tightness, fixed vs. arbitrary precision); state-space models and their syntax/interop with DSolve/DSolveValue (inputs, outputs, how to feed input signals like Sin[t], possible association or arrow syntax, desire for clearer, less hacky API); integrals/sums/truncation (truncateSum design, defaults, multi-dimensional truncation, activation/inactivation of symbolic results and an 'ActivatedResult' option); convolution/Laplace conventions (unilateral vs bilateral, naming for functions like OneSidedConvolve); PFQ/bilateral PFQ and special functions matrix forms; and UX/performance considerations (not activating heavy symbolic work by default). The transcript also records specific UX proposals: truncateSum(list) behavior, ActivatedResult->{True,False,Automatic}, and state-space model input-arrow-output form. Several implementation questions remain to be inventoried (which matrix ops support 'around'/intervals, which functions accept structured arrays, progress monitors for slow loads).
Chapters
Sam.
Hello, everyone. Welcome to our third design review of the day, preparing for version 14. This is continuation of our discussion about calculus and algebra. And let's see, where are we going to start? We're going to start. We already follow up with finite fields.
I mean, I don't have the revised names there for you. We came up with new names, Adam.
So it's finite field index without elements and to finite field without coefficients.
Yep.
So.
And from finite field so on.
Yeah.
Okay. But we also had graphic design changes for the appearance of a finite field element.
Right, right.
Okay. Are those, do we have those yet or. Not yet you die.
I haven't received anything from, from Jeremy yet. I thought he was, my understanding was he was going to send something to me. If I'm mistaken, I will follow up.
And who, who's PMing here?
Avery, I'm. I'm here.
Okay, so if you can try and connect those pieces, just make sure that something comes together. Thanks. All right, I think we're on to matrix operations. Is that correct? We had, we talked about, we talked about some of this right. Last time.
Yes. These are the N versions basically of the S versions we introduced last time.
Okay, so do we, we didn't talk about the structured matrix stuff last time. Is that correct?
No, just a little bit.
Ok, do we want to talk about that here or is it.
We don't necessarily need to. As I said, I think we have another round to go before it's all kind of filled in. But.
Let me ask a question about, about things like symmetric matrix. Okay, so, so if I'm. Let me pull this up. Do I need to go to the. Well here, let's.
Let's source. Yeah. If you want to see the documentation of it or something.
No, no, I understand but I mean if I just say symmetric matrix, what's the input?
Just a symmetric matrix. I mean that's one of them. But you could also have ragged kind of thing where you ask it to fill up.
But okay, so if I say table of range of I, I up to five or something, that will be a ragged creature.
Yes.
Okay.
If you do normal of that you can.
Or matrix form, it will, it will have symmetrized it.
Yes.
Okay, so now this. And I'm confused here. So.
Well, it promoted a vector to a matrix, right? Oh no, you did range. Sorry, I. Yeah, never mind.
Well, so if I say. I guess my question here is this. I'm still. I keep on thinking about little tabby things to. And maybe it's wrong thinking where some kind of raft could offer conversion of that object. That, that's, Is that a bad idea? Is that silly idea? I'm just trying to get some way that, that we don't be. Feel like people don't feel like, oh, there's 700 data types now and I don't know how to get from here to there. I mean, if I go from this. Go ahead and I say orthogonal matrix.
You mean like the summary box had like a little, little thing in it you could click like normal? Basically?
Yep, exactly. But I mean, if I do this splafooroo, why didn't that work?
Because it's not an orthogonal matrix.
Right.
I mean, what's an example of one that is that, that where like any.
Rotation matrix for instance, would be orthogonal. Any permutation matrix.
Yeah, okay, fine, fine. But I mean if I say what I want to do is, I want to get. What I'm looking for is, is can I do this? By the way, that the message text not found is obviously a bug, right?
Yes, yes, yes.
But my question is just this will work if the thing is, right, do.
Do Hermitian matrix of symmetric matrix. I mean, it'll be a trivial Hermitian matrix, but.
All right, Magnificent. Okay.
I mean, the one question I have is sort of, you know, what's the relationship between symmetric matrix and the symmetrized array of, you know, of rank two and the same symmetry.
Yeah. What is the difference? And if you say symmetric matrix or symmetric array, will it convert better?
It should. Symmetrized array, right?
Is that correct? Guys?
I'm not sure. We've gone as far as arrays. We've tried to stay within the matrix. I mean, Roger's idea was that we should try and promote the matrix.
I mean, this can be done, you know, it just means that symmetrized array needs to recognize this and know what to do. You know, it's just another input form for symmetrized array.
Yeah, yeah. Right. So seems reasonable to me. Go ahead.
I'm just saying that we didn't go down. We've tried to stay in the matrix world because that was the.
You can't do that. Sorry, I just don't understand your preferences.
I, I know, I understand. It's just a question of, I mean, what we could, I mean, we've done so far.
So it's may not be the highest priority, but I don't think it's right.
No, absolutely. No, no, yeah. We're looking for stuff to do.
So, so here what we, you know, there's more things that need to be. You know, there are many more structured matrices generated that are not yet sort of promoted to that type. So for instance, when you do correlation, that will be a symmetric matrix. Always a correlation matrix is always a symmetric matrix.
Right. I have a question here. When we say target structure error or whatever, surely we should support also. Maybe you do. Surely we should also support, you know, unitary matrix.
Right.
Because the fact that the. All these target structures are in fact types.
Yeah. I mean I think the most useful thing is automatic though. But it's.
Okay.
Yeah. So. Well, in this case it's probably not going to.
Why is it not good?
Well, because I like what it did now, for goodness sake.
No, we don't change that. Yeah, but we have done it for identity matrix, you know, there's sufficient large size where you have.
Yeah, fine.
But here our thought is we don't change stuff. We want to give a kind of language for going into the new world. But I think that what you said earlier on about unit.
We need another symbolic value then that. Where you don't have to specify which type. So automatic but not automatic.
Well, maybe it's an all.
Yeah, maybe that's. That's it. Yeah.
I mean, right.
We.
We have used. Right. Dense, sparse and structured.
Yeah, those are big classes of things. But structured is. Is like. Like a whole family of structures.
Right?
I mean, exactly. Right. But it's sort of choose. Well, I. I would hope that what it means is, you know, choose the most sensible structure for this.
Oh yeah, struck. Yeah. But we had structured. I'm sorry, we have strings structured and that is what I was looking for. That's what, what. What is the most useful.
Hopefully that should be okay.
Right. I mean. Right. The problem. I mean we could I suppose support arbitrary heads. But. But the. Well, that's clearly a bug. Yeah.
I think this should just. So this should just give back the most natural. I guess it should give back a structured array.
No, it should. Should give back an orthogonal matrix.
So that. Because of the natural associate over here. Yes.
Yeah. So this automatically picks which structured.
Yes, that's fine. This is easy enough to do. That's fine.
Okay, let's talk about the workflow that people actually want here. Okay. One of the great features of our system is that you don't have to know 7,000 different data types. So the fact that this just comes back as a list is a huge win, let's say. I didn't.
I don't know. I think for small things it might be useful to have the explicit list finished.
I hadn't finished. I hadn't finished. Okay. The workflow is for the things that you do interactively and you know, fractions of a second you just don't want all of the structure. Okay. But then a typical workflow is. Now let's scale it up now let's do the case with, you know, a million, million by million matrix or something. Okay. For which if it tried to blow it out this way, it would blow everything up, as we all know. So what I'm trying to understand is what's kind of the. The methodology. So. So for example, you know, when we print things out, we're talking about this with graphs as well. I hope we're going to get that with graphs soon of elision. We have that with just printouts. We have that with. With data sets. We have that with. There was another thing we were just talking about doing that with where, you know, when it gets too big, we elide it in some way where it's rather easy if you wanted to, you know, you press the. Forget the elision button. Okay. And so what I'm. The thing I'm coming to is. And that's why I was sort of talking about rafts and so on. Let's imagine that what came out here was a thing. I mean, just like the. It isn't quite like the too big thing, but it might be. Might be. We could make it that. So that if the thing.
Well, like.
Okay, let's take iconized, for example. Okay, let's say we were going to produce and something we haven't thought about yet, but we could is something where when there's a big output instead of just giving, you know, that we auto iconize certain pieces of it because it's not useful and it's going to blow out the front end to try and print it. Am I making sense?
Yes.
What I'm.
What I'm kind of thinking of here is what if there was something that's kind of like iconize.
So here's what I think that the future I would like to do for this, which we're not ready to tackle yet, is that we'll basically have a matrix type and I will absorb sparse and structured and so on as internal structure to it. Then it can always print even if it's a million by million matrix. But you're not going to look at every entry in a million by million matrix. It will show you 10 with elision stuff, things that they can actually show on screen. We could also do other things to kind of summarize the overall structure, even though you see kind of an ally, you know, partly printed out but also elided. But it's never going to super stress any part of the system because you didn't actually format that big thing and then elided you.
Right, I understand, but I mean, so for example, sparse array has been, I would say, fairly successful at being a. You can treat it like the, like the array that's. That it represents type thing. Yeah, most operations part. And flatten and I don't know if flatten works. Does flatten work on sparse arrays? Probably does.
Probably does.
I actually would have to check disperse array work on. Sorry, what's the question?
Does flatten work on sparse arrays?
Oh, of course it does.
Oh yeah, nice. Okay. But so.
I guess it does on any of the structured arrays. I mean, you might lose the structure, but it'll still work if you flatten, you know, percent 13 or whatever that is that symmetrized array. Right. It won't be a symmetrized array anymore. Or that one. Well, that one would. Because it's a symmetrized array. But you know, if you had a symmetric matrix and you flattened it, it's not a matrix anymore, obviously.
My question is when is sparse array promoted? I mean, do all functions that work on lists also work on sparse arrays? Answer no.
Correct.
And does that cause a problem? I mean, like for example, if I say column of percent 16, oops.
I'm sure it's going to work.
Yeah. Oh, okay. So an interesting question and an interesting study will be to see what sparse array does and doesn't work on. You know, we, we've had it in the system now, what, 15 years? More than that or net.
Yeah, closer to 20.
Gosh, how time flow. So my point is, you know, that's a case where, and we've had obviously packed arrays internally for longer than that, right?
Yes, version four.
Okay. So I mean, I'm just trying to understand how, you know, packed arrays, sparse arrays, whatever. This is not a thing we have to discuss right now because, because what's happening in this version seems fine for this version. And you know, it's a, it's a, it's like data structure. It's one of these optimizations that the cognoscenti will know about and others will not.
Yeah, but as I said, the long term, asymptotically I think that all of these things, sparse arrays, structured arrays, you know, other arrays will be part of a, you know, an array structure that, because if we just took, we tried this exercise in one of these design reviews where we had this discussion a couple year or two ago, people want them to be displayed as matrices, but people use lists of lists for other things than matrices and they might be fairly upset if we always types it.
Yes, it's a typical problem that exists in the graph stuff. Graph uses traditional form, which is something we should fix, by the way, that this issue that if you give a matrix or list of lists as a label for a graph, it will show as a matrix, which is often not what you want.
Right. Yeah. We run sometimes into that same issue with WolframAlpha Notebook Edition, which defaults to traditional form.
Right, right. Well, right. And so you're saying is if we had a matrix wrapper, we could. Or array wrapper of some kind. We could tag that.
Yeah. And then, then it would be reliable and we can.
I mean, there are operations where it will reconstitute a list of lists, but that reconstituted thing will be. What am I trying to say? We'll. We'll. Right.
I.
You know, won't reform in the same. There's no, it's, it's like graphs and other things. It's like what. Or, or colors on, you know, when you do a graph union of two graphs and they have annotations on them, what do you do with the annotations type thing. Same thing here.
Yeah, yeah. But I think that if we had that sort of eventual sort of object, then the flows, the workflows will just be kind of one level simpler. There's so much more automation that we can do along the way.
Yeah. All right. Okay. What else do we need to look at with these.
I just want to talk for a couple comments that, you know. Right. I mean, the reason some functions don't understand, you know, sparser A or these structures things. Right. Is because people literally write rules, you know, down values for blank list instead of, you know, blank question mark matrix.
Queue and what in the internal code in.
Well, yes. Or their own code. Right. You know, users are writing packages. Right. You know.
Yeah, well, we need to deal with that. I mean, we need to deal with that. We need to have some way of doing. Which again is not. You know, we've done it with pack.
And we, and we do have. Right. We have this function developer list representation cube. Right. Which gives true for lists and packed arrays and sparse arrays and structured arrays. So all of these things will, you know, so people should be writing things correctly and, and, and they're not.
And they won't. They won't. They won't it's not a bridge we can get them to go over. Sander on our livestream asks rather sensibly, why is there no matrix wrapper that basically doesn't do anything except formatting?
It's called matrix form.
Well, matrix form needs all of those things need a lot of modernization work. Yes, there is no such first of all that needs a lot of modernization. There's a lot of features that I think people want and they wanted to hang around the matrix, not just one shot but.
I know but that's the point. I mean if we had a transparent thing that you know, if matrix form. If every operation that dealt with matrices ate a matrix formed matrix, that would already be program.
Yes, yes, definitely that is but I.
Don'T really see any harm in these things eating up eating a matrix formed matrix.
It, I, I, I see harm. I mean what, what's a thing that takes a matrix? I mean part people use part to operate on a matrix but we can't make part treat matrix form specially.
Well we are proposing to. I mean part does treat sparse array especially. Well.
That's, that's because sparse arrays are atom Q and you know they're, they're documented to, you know, behave exactly the same as the corresponding ordinary.
That's why Sanders comment about matrix as a rapper which is what you're going to as well with the whole. You know.
I am but, but it's going to have more stuff. It's going to be more like graph that in. You know and that also affects things when you have real, you know, when matrices represents real data, you might want to have more annotations around them. You might want to know that the third column is your temperature.
I know but, but that's what we've done with data set. That's what we're doing with, with data.
And you need, you want other things. You want to highlight a column or row a sub.
I know but, but I, I just, yeah.
We going to get all that. I have a plan to get it.
Okay.
I don't think matrix form is the way to get it.
Okay, let's not talk about it right now. I don't think it, we, we're, you know, we're six months early.
Yeah. At least.
All right, what do we, what do we need to look at here? And this is basically fine. That's kind of cool. Clearer way to show the result of QR decomposition. Okay. Intervals. Can they deal with a round as well?
No.
Nope.
Ouch. What's it going to take to be able to Deal with a round in linear algebra.
It'S possible that it works. If arithmetic works in a round, it could be. Well, basically the naive, you know, the schoolbook algorithm is just rational. And rational operations work. Actually. Probably, yeah.
The thing is whether the result has correct statistical meaning of the error in the round, which is troublesome.
I mean, it won't because just as you know. So one of the problems with both of these is the dependence problem.
Yes.
And so both centered interval and a statistical interval like around treats things as independent. And that means.
That's at least amusing, not horrible. I mean, look at the size of the arrows though.
Yeah, and so actually I meant to ask that. So that, that the way that these linear algebra operations are implemented, if it's just naively implemented with intervals, they will have much larger intervals than if specific choices, algorithmic choices are made, that mitigates the growth of intervals.
Let's hope they're tight intervals coming out. Are they?
I don't think that they're tight, but they're for sure enclosing. The question is.
Yeah, so they guarantee enclosure, which is more than we got with big nouns, for instance.
Okay, but do they in fact puff out a lot or not?
It really depends on the operation. Inverse actually doesn't seem so. Still a little bit. Yes, they are losing precision, which is correct. I mean, if you work with big news, you get the same precision you started with and it's. It's not correct.
Interesting. Well, maybe we should fix that.
No, that was an explicit choice to make them fixed precision and not very precision.
Wait a second. So if you have, in a Matrix you have 20 digit precision numbers and you invert the matrix, what do you get out now?
I think it's. It will say, would you check what the precision is of the matrix? That's the precision that's set. And when you get it out, it's going to be 20, you know, same precision.
I see. And is that correct or I mean, is that under what circumstances it's a.
Choice because.
What is it assuming about the independence of the elements?
Well, it's actually doing fixed precision computation, so it doesn't track the errors during computation.
Well, I understand the implementation, but I'm asking theoretically, if I do a matrix inverse, then is it not the case that. I'm just not thinking clearly about this. And it relates to the around qu case as well. The around case. We're assuming every error is uncorrelated.
Yeah. And intervals, you know, individual operations assumes that too.
Yeah.
The difference is, you know, in the around you do the average case error in the center, you do the worst case error.
I understand, but, but. Okay, okay. Is there a clear right answer in both the interval case and the round case for the matrix inverse, or is it something which depends on one's assumptions about independence of matrix elements?
No, there is a, there is a definite tightest possible. But I don't know of any algorithm that can achieve it.
I see.
You know, I think that there's been some study of, for some particular families or matrices where they can compute it and to show sort of as benchmarks, to see benchmark against other algorithms that are practical algorithms and see how, how bad off or not bad off they are.
Yeah, yeah, I understand. I mean, this is, you know, all we've ever been able to do in, you know, in arbitrary precision arithmetic is to not, you know, come up with digits that are fake, so to speak. We can't guarantee that we give you all the digits that we might conceivably give you. In other words, we might have an algorithm that in principle, in this computation there's a way of uniquely determining 20 digits, but our actual algorithm only gets 15.
Well, that too, but the significance arithmetic has failure cases. It's not like interval arithmetic, know, particularly with low precision, the singularities in that model. But, but when you have high precision, it's really good. I mean it's like super good and, and not. If you have high precision and not so much error, it's super good.
Right. All right. Well, anyway, I think we understand this so far, but I, I do think that, I mean, can somebody please inventory whether around works with all of these different matrix operations? Yeah, and then let's ask the question, and we should probably put examples in there. But I mean, ask the question, which matrix operations are you not supporting with intervals?
Well, I'm sure a lot of the, you know, like, so all the other.
Operations will just work with, you know, they will work with, with intervals, but it's hard to tell whether they are getting correct enclosure. They'll just treat intervals as arbitrary objects.
Right. Yeah.
So how do we indicate when we get the right answer and when we don't get the right answer.
Other than by looking at the documentation and seeing that this function supports intervals. If it doesn't say that, then it doesn't.
Right. And I was going to say that things that don't really have symbolic algorithm. Right. My guess is that the around is going through the symbolic code. Right. So any function which doesn't have symbolic algorithms is going to die.
Right. And function that does have symbolic algorithm might do something which is incorrect in terms of, you know, working with a round.
Why? How could it do something incorrect? Well, assume everything is uncorrelated.
But if you divide A by a, you may get in the case of a round, you will get something with. Should get something with the error with a matrix. If you do, for instance, row reduce, you will get exact ones on the diagonal.
But.
I know, but you'll never get the wrong answer, right? You'll always just get an answer that is right.
Unless somebody is forcing the exact ones on the diagonal columns. Right, exactly. Because they assume that division produces an exact constellation.
Yeah, I understand. So that. Okay, well for goodness sake, we should take a look at this. All right, let's continue.
So the other thing, just since we're talking about around centered interval. So we have been flowing or we are flowing in. So we have obviously special function evaluations for around because it's just based on a series truncated series. We likewise have matrix functions. So we have element wise, which is the list ability, but we also have matrix functions which we're going to flow in which also have. For all the special functions.
What do you mean we have. What do you mean matrix functions? You mean?
I mean we have matrix function.
Matrix function function.
Exactly. So you can have a matrix.
I see. That's nice.
Hypogeometric PFQ because of that.
Yeah, that's amusing. Let's hope.
Well, the special functions people wrote a bunch of books on matrix functions of.
Okay, all right.
G and H and it'll be actually.
That's good.
Yeah.
All right. Should we move on? Okay, so have we covered everything? We have not covered everything here. We looked at N line integrate. Yes, yes. And surface integrate. Okay. I think we were. We had some trouble here, didn't we?
So yeah. And I can give a bit of background if that's okay. Yeah, the background is that we have been trying for some time to see whether we can actually put models into our calculus function rather than equations or other input algebraic. Now question how do you do it? Which way to control system, which is the one place where we actually have a very close relationship with DSolve, etc. In fact, they actually use our functionality quite a lot. Probably the only part of system that does it so systematically. So then the question is, can we look at the thing like in a state response, output response and try and access them from within. Let's say D solve or D solve value. And we tried the equation based approach. Subha had shown us how to get the equations from the state model, it looked pretty much redundant because.
I get it.
I understand. I want to know about the syntax here.
The syntax is very simple. You have. You have a. Instead of having equation, you have a state space model. Right? And then you have an input. You need an input for that to happen. Okay, so in this case, SIN T. That's. That's SIN T. And it's documented.
Look, look. This input is a mess relative to the standard dissolve input. It's just a mess. I mean, it's just a mess. The fact string thing. Right. So let's try and clean it up.
Yeah, okay, sure.
All right, so let's understand what is a state space model. What is that?
Okay, so that is.
What is going on here. Why is this taking forever?
I don't know. Doesn't make any sense to me. Unless. A, B and C. Okay. I don't really know why it took time. Try it again. Well, probably loading something.
Yeah, but if it's loading, it should tell us. Let's please start having progress monitors at these things that are slow.
I don't think. Okay, but that's a whole new thing, like loading packages. Like. No, startup packages have progress monitors when they load.
I know that. I know that. But I think we should inventory which ones are slow, because I. I'm surprised this is so slow.
Yeah, me too.
Okay, so go ahead.
Actually, probably the easiest is to go to state space model reference page. Because I'm going to try to say in words what's on there. Open it up. Now, this is a slightly old page. Needs some modernization, but explain it. See the. There are many kinds of syntaxes, but you see the basic representation in the paragraph that you're pointing to. X is a vector. X prime T equals a dot, x +b dot u, and U is called the input. So that's what you would call a forcing function. Then there's another equation, which is the output equation. Y output equals C X plus D U. So it depends on state and input.
And this thing just has by convention. Abcde. Yes, splof. Okay, but state space model there represents this equation here.
Yeah. So it has more extended forms. That's a die there. Okay.
Okay. How do I get out the actual equation for that?
So that's not documented, but we can bring it up in the next design review. We do control. So it's not for this group to fix it.
I know, but I want to see roughly how it works.
Yeah, Calling Suba here right now.
Yeah, let's do it. Let's do it. Nobody can do that, please. I mean, is it like I type equations here or something? Probably. No.
Well, he showed me a long way, which he actually sent me.
I mean, it's not official. It's not official.
No, I, I realize that. I understand that it's got to have. It's got to have a dependent and independent variable that it's got to specify because this thing is a disembodied, you know, kind of equation by, you know, hung up by its coefficients.
Yeah, exactly right.
Which is all well and good and a thing that indeed deserves to be indeed solved. It's just a question of what on earth the actual syntax looks like. Fair.
Yes, yes, absolutely, yes.
All right.
So anyways, one of those systems with an input is a completely specified system of differential and algebraic equations.
Yes, I understand. I mean, I understand this is a. I mean in principle we could go from a state space model to. I mean, if, if we say D value. I see, I see.
And the first, by the way, just. You said that the input to dissolve is clean. I don't think so. It's like a soup of, of equations and initial and boundary conditions.
I understand, I understand, but I mean, it's, it's okay. The scoping of variables is if not perfect, at least reasonable.
Absolutely, yes.
Okay. But here I just have no freaking clue what's going on. And I. We need suba to talked about sub values of state space model. I don't get this. I don't understand this. I understand that there are different ways to use the state space model, but I don't think this belongs outside inside the D solve. Let's keep going and we'll come back to this as super.
Sure, sure.
Yes. So then we have the same discrete problem. I think I honestly am happy to even get D solve values, you know.
So difference equations and differential equations are both used. Difference equations for digital systems.
Right.
Differential equations for analog systems. Let's look at this.
Do you solve Riccarti equations?
Yeah, these are just improvements for the book by polyanin, which is next target after com K. This is a modern version of polyanin, much of Kamki much more, much deeper. So we're trying to absorb it bit by bit. This is the Riccati part over here, which reduces the second order linear, basically. So that's kind of classical dissolve.
So this is serious. In order for the workflow when we return, typically infinite sums for like PDEs. You know, if you do separation by, you know, separation of variables, this is.
Like series for sums or precision for sums.
Yes, it's gonna.
Yes, sort. Yes, kind of. Sort of.
What about products?
Yeah, well, we thought about.
But it didn't. I looked at what we around and products seem to be infinitely small and used and strong. We could have a truncate product. I have no problem, but I just couldn't justify it based on what.
But I'm not completely buying. I mean like you can presumably truncate differently in the positive and negative.
Yes, but we document that how we do it. I mean, what's useful. Yeah, we document every single piece that's actually being done.
And is there not a better model for this, a simpler case way of doing that?
So what we had is like there's like just one super simple thing which is like a number, type or nothing. And then there's a detailed case which is a, an association.
Okay.
I don't know. I mean it's not, it's not unreasonable at least. So I'm saying that spec there of sort of control more and more details.
Yeah, I agree. I mean, I don't know about this. Activation inactivate. I see. Because the point is activate somehow automatic will just go from, you know, presumably it will go from activate inactivated to inactivated. Am I making sense?
It will go from inactive to act to activated. So. So it will evaluate.
Okay. I mean, it's not totally obvious. I guess that's the right thing to do.
Well, if you want to plot it for, let's say. Right.
Yeah.
Okay. So this is a typical use case. You want to plot sort of a truncated solution to a PDE or Eigen, you know, differential Eigen problem. Then. Yeah.
What about an indefinite sum?
What do we do with those? I mean, I don't know because. You mean you won't truncate that.
But there's no thing to truncate, right?
There's.
Well, there is implicitly. I mean, it's kind of like adding limits to the sum, adding limits to the integral. But that's an implicit truncation like operation.
We could do that. I mean, you got to assume some kind of assumption about a lower limit, upper limit, something. I don't know, something like that. So.
Yeah, it's not, it's kind of messy.
It, it, it. I think this. We typically don't touch indefinite thing for that reason. I mean, I'm not saying we should not do it, but I'm just saying this. Well beyond what we need. But it seems to have.
I think this is nice. I think we should. Thank you.
Thank you. Great, great.
I think. Is there anything other than Selling product that could get this.
Well, I think it's pretty far out. But continued fraction K would be.
Yeah, I know, I know that's.
But I think it's like so far out the tail.
Yeah. Okay.
And here's bilateral hypergeometric, which is basically the bilateral version. Oh, Laplace convolved first. So I think we just talked a little bit last time and there are three options. We need this because it's been. People get confused a lot between different kind of convolution and they're looking for this kind of convolution. They look at convolved gives the wrong results.
So something I'm sure you have occurred. You know, seen this a million times, Stephen. A domain or community use a convention which they document and they use the same words to describe it. Like convolution. And Laplace transform is a good one. And in one community it's a bilateral everything in another community is unilateral everything. So the signal processing community is bilateral everything. The control community is unilateral everything.
Okay.
It's just same names, just different meanings. And we found. I mean that's what we found with Fourier transforms too. Right. Like every community had their own indeed definition.
But we were there, we parameterized it, right?
Yes, yes, but that. I mean that itself is really hard to document. And in this particular case, honestly, this is what people most often want. The convolution. I mean I haven't really seen anyone actually.
So this is one sided convolution, is that correct?
Yes, yes, it's. Yes. It goes from zero.
One sided or unilateral or causal. Those are three.
You think you're kind of green's function.
Kind of.
You're convolving to get the stated time. The solution.
I don't think muscular plast should be.
No, I'm. I'm happy to have it. Causal unilateral water works for you.
One sided convolve.
One sided.
I think if we. If we call. Since we called the other ones bilateral. I think we shouldn't sort of mix to.
What do we call bilateral?
Bilateral Laplace transform and bilateral Z transform.
I see. So this would then be unilateral convolved.
That's fine then absolutely no problem.
I think it's much better than the plastic involved.
Yes.
Which confuses me. To Laplace transforms and go. I mean it's related, but it's not. It's not the same.
No, I think it just restricts the use unnecessarily. So we can change to unilateral convolved. No problem at all.
Okay.
Excuse me, this is Subha. Did you need me here?
Yes, we do.
Okay.
Stephen, can you take a couple minutes and look at. You want to look at PFQ later on? It's fine with me, by the way. Well, it's a bilateral PFQ and we can come to later.
Let's just look at that for a second. If it's really fast.
It's very fast. There's nothing over there, really. We're trying to complete out of pfq. We did appel last time. There's one last thing, which is the bilateral. We just talk about bilateral. So BioPfQ is basically the doubly infinite version of PFQ. It's got a very narrow range of convergence. Like in basically unit circle, you think of positive frequency, negative frequency. The two will converge only if.
Yeah, I get it on a very.
So. But this is kind of the very extreme case which we are missing. And we've done it now. That's all. But it's nice because. Yeah, that's all.
Unilateral, bilateral. Do we. I mean, I don't know, do we have stuff at wavelets that had this issue as well, or do I just remember.
I'm gonna go check.
I'm just wondering what. I mean, it just reminds me of all these, you know, bilateral commissions and this and that. I don't know.
Positions.
Yeah, yeah. Bilateral filter here.
No, so we had bi orthogonal.
What the hell could that mean?
Well, there's a B orthogonal spline wavelength. It's just like special wavelets.
Yeah. Okay. Sandra is asking on our live stream about multiple sums, and I realize I don't completely understand that. So when you say trans truncate sum of expo, what on earth does it default to?
Each. Each of the iterate. You know, if you have a multivariate sum, say three summation signs, it truncates each one to that number.
Okay, but this doesn't have a number. And I don't think there should be a default. What would the default be? Now that's crazy. I'm sorry. This is crazy. You cannot have a default of five. Just give the frigging number. Is it five? Because we have five fingers.
Why?
No, no, I think Roger's point is that we should have a default which people. People don't need to specify, but we can just take that away. We don't document it.
That. No, no, I mean the multip. Didn't you switch topic right now?
I did. We're back to truncate sum. Oh, yes.
Didn't you say truncate multiple sums?
That's what I was answering, but I, I, I. Now I've realized that I should have looked at this more carefully because this is crazy, in my opinion.
Well, it's a bit like I, we had. We happy, not.
It's a little bit like when you.
Do n. I know, I know. I was going to give that exact analogy. How about we don't do that initially?
That's okay.
Yeah, no problem.
Because I just, I'm not convinced.
No, no, it's okay, Stephen. I was a little bit uncomfortable with it, too.
Yeah, fine. All right. Now, let's look. Talk about double sums. Presumably, this could be a list five, five or something. Or it could be just a single five, in which case it means all the indices go up to five. Do we agree?
We. We haven't done that because this is typically an expression with potentially many sums in it.
Okay, well, then in that case, if you give a single number. Yeah. You say truncate this, comma 5. It just means that every one of the sums goes up.
Yes, exactly what it means.
Okay, fine. But what I'm suggesting is that if you wanted to have different numbers in different dimensions, so to speak, we could probably support that.
So that there would be sort of, you know, like two, three would be sort of two.
Exactly.
Then we need to sort of say order. What the hell does that mean?
So what happens if the outer.
Order. Yeah, Order. Inner.
What the. Yeah. Well, that is a good question, but. So the answer is the order should be the same. Imagine you're making a table. No, imagine you're making an array. Okay, Imagine this is an array, right? You say array sine IJ. Well, sine 1, hash 2, comma 23, whatever. Order that. This is a stupid case because I should have done just a list there. F of/1 and/2. I didn't even need the F. Okay. So whatever that does.
Okay.
See what I'm saying.
Yeah.
Is what it should do, in my opinion.
Yeah. And actually, by the way, we had an earlier very bad syntax where, like, you know, for each Iterator. But that looked really messy, so we abandoned it. But this is definitely worth doing, I think.
Yeah.
So we. So we take away the default, that one without the second argument, and we add the multiple. The Both are. Okay. Very reasonable. We do that.
Okay.
So what happens if the limits are dependent on one of the variables?
Right.
I mean, I think.
Let's think about that. Then. Then this becomes a cookie cutter. That might Be where the cookie might be smaller than the cookie cutter.
Yeah, right. I. I think, I mean, we've. We can play around with that, but the whole point was to give something that's. That kind of solves this problem which you're having all the time. We need to go forward with Fourier series other things and we, you know, we can take up things like what.
It is saying, but we have replacement.
It needs to be basically max sort of min n comma and that the. The. The sort of max number you gave.
Okay, but do you understand my analogy?
Yeah, yeah, I understand what you're saying, but. But I'm just gonna check with them. I can check that separately that our implementation actually does it.
Oh, I see. I see. Okay, fine. That's separate as you.
Yeah.
I don't know what the heck total terms does. I mean, I. I think these.
Probably we should not do that at this point. This. I think it's better to keep it simpler.
Do we have another option we could reuse for this activation thing? No. Are you sure?
Well, if you said activate that with the natural. But then we have function called activate.
No, but. I know, but don't. Do we have something like activated arrow, true or false?
No, I've not seen that. So unfortunately, activate is the most natural thing in. Over here.
Act. What? Activated.
Activated. I see. You need a new option for that.
This.
Well, I'm thinking. I. I don't know. I mean, maybe we can add that in some other places as well. Like. Like for example, we could do integrate.
Yeah.
You know, or you know, when we do an integrate and we produce the sum we currently produce an inactivated sum, is that correct or is it an activated sum?
I don't know that.
I don't think integrate ever returns a sum. Some not yet in D. Sometimes return.
Asymptotic will return a sum. Diesel return a sum.
Sorry, Are they okay either way, but are they activated or inactivated?
Sums and integrals, It's a choice, but generically they'll be inactive because they're too hard.
How do you make the choice?
We make the choice very simple. That we try the indefinite integral. If it looks like it can be done, we do it. Otherwise you might very well wait for a few hundred seconds for the definite one to give up.
No, but wait a second. When you say it's a choice, does the user have a choice to just say always give me the inactivated version?
No, but that's actually something that's been asked.
But that's a good point, Steve.
So why don't we just have an option called, you know, activated results or activated. See what I'm saying? And just put it into all these functions.
Is that for 40? No, you won't.
You just know.
You just know. No, no, I mean, like Diesel testing alone would take a month. So.
Yeah, okay, fine.
Yeah.
All right. But let's just come up with the design though.
Sure.
I mean, I'm not quite sure that activated is the right thing because that suggests it's not clear that it's the result that's activated.
Yeah. So Diesel can return inactive integrals and inactive sums. Basically, yes. At this point. And I think in the future integrate will probably also possibly return inactive sums.
Okay, so I mean, activated result, arrow, true or false.
Or automatic.
Yeah, yes. Or possibly some association which gives. Which what to do with particular functions.
Yes. So we had an interesting case that Diesel got sped up some huge factor when we stopped activating the integrals because a lot of failure cases was trying to do the integrals.
Yes.
And so literally all of a performance problems that people have complained about went away. So it's not always a good thing, I'm saying, to be. Be activated.
Yeah, no, I realize. So activated result. Activate result. Activated result.
Activated result. Sounds like, you know, it's like what they're telling us to do or not do.
Which this one here.
Activate result. Yeah, just like what. What they are.
I don't. I agree. I don't think that's bad. Roger, what do you think?
I think it looks good because I can see us. I can see us doing it more. I mean, these of us been. I agree at the frontier of this, but I agree.
I mean, this is. This is very similar to the target structure type thing. It's returning something which is not quite digested.
Right. I mean, I think inactive has in independent value because sometimes you want to see the formal structure of things. It's very useful. So.
Okay, like what?
Yeah, like when people do, you know, separation of variables, it comes out as a sum. That's what you learn, you know, it should be.
Right. Sandra is asking what if you have a nested sum and you only want to truncate the first level of the sum? Well, the answer is you say truncate, blah, blah, blah, list one.
Yes, yes.
Afterward, discuss. Right now. Yes.
I think what we should say. The only thing we should do is we say truncate sum, blah, blah, blah, blah, blah, list one. Let's say you say if you just want to unravel one of the sums, you should say either infinity comma, five, comma. You Know what I'm saying? What should be the thing that is the one that says don't unravel this automatic. No, no.
Infinity is fine as well. I mean.
Well, I'm not sure infinity is right. Maybe it should be because. Because in this case you've got sums here that are. I mean, full might be a possibility. All wall is the right thing. All is the right thing.
Okay.
Yep. Okay.
So just. So you just want one last clarification. I know we could ask Roger. So do you still want the association or you'd rather not have them keep it experiment or keep it experimental was released this function until we got the option done. I mean, we can keep it or.
We can get this option for this function, the activated result for activate result for this function. We can get that.
Okay, fine. Yeah. Okay.
I would just punt the association. I would just. You can put it in if you want as an undocumented thing, but I would just punt it. I just don't think it's that useful.
Yeah, honestly, it was.
Since we skipped total terms and we elaborate that we. The activate sum is now a new option. There's nothing left, actually. It's all gone.
Okay. Hey, Santa suggests another thing which is a sparse representation for the. This case here where you could say something like 2 arrow 4.
I see.
Which is not bad.
Yeah, it's not bad. We can talk about it later, Dementra.
Yeah, sure, we can do that here.
One thing that I worry about one day, which we don't have right now is maybe it just isn't a thing is sort of the D dimensional summation where. Where D is a variable, where it's just like sum infinitely over. We always explicitly nest the sums.
Yeah. We are slowly coming back to sort of the discrete calculus side and multivariate sums. And the language of multivariate sums is very much on it. And summation over regions, which this kind of is.
Right, well, just so long as this truncate sum doesn't blow up something with. With the summation of a regions. Because I guess what you want to do is truncate sum comma, a region.
Yeah, but I think that, you know, the way you can see truncate sum is kind of like intersect the region you sum over with this.
Yeah, linear thing.
Exactly.
Yeah, that's what I was thinking. I mean, the truncate sum could then take as a region specification maybe a pure function that says, you know, hash one between this and this and you know, some eventually.
So when we. I think when. When we do summation of A region. We should overhaul this to also take that specification.
I agree, I agree. We don't yet have discrete regions though.
No, and I don't think we'll explicitly have them, but we will have an interpretation of them. So what we think is an intersection with a real region and a lattice. But we'll come to that. We haven't really worked it through. Just bits and pieces.
Okay. Sandra's asking the actual. You know, should you be able to give the actual index and truncate sum? I think not. Because of scoping.
Yeah, we have that discussion. And that's. That's exactly my answer. You know too, because what if you have. What if you have a big expression and there are two eyes that are summation indices? Which one did you mean?
Yeah, right. And they're locally scoped sum of sums. If the truncate sum is a sum of a. Of a. You know, how does that work if you've got a sum of sums and one of them is a univariate sum and it does. Doesn't have a second layer sum in it. Now a truncate sum can take any expression, can it not?
Yes. And there can be many sums inside of it.
Right. So it's like N. It goes in and reduces the precision of every. Effectively of every sum.
Yes, yes.
So it should just ignore the semantics should presumably be. If it asks for a summation over, you know, restricting a variable. Whether variable. Whether. Isn't such a variable. It should just ignore it.
Yes.
Okay. Right. Let's return to the. The thing we were talking about earlier, which was this state space business. Okay. Suba. How do I get from this state space model. How do I get. It's differential equation.
Oh, okay. That's an internal symbol.
That's not good. Okay, but tell me how to do it.
Okay. It's okay, I'll put it in the chat. It's that symbol and wrap a. Wrap state space model around it.
That's horrifying. Well, I mean it's.
Yeah, well, I guess it's horrifying both as an internal name.
But what do you mean? Is that. Is that an argument to state space model?
No, it's. That's the function that acts on state. Then you give the state space model.
Inside and what variables it's going to pick.
It'll default variables.
So the.
So the first argument. The first argument of the first argument is the differential equations.
Okay. And the other ones are the independent variables and some weird.
Yeah.
Why not the independent variables?
Well, that's exactly why we have formal Variables, Right. It's using the standard names as formal variables.
Yeah.
So if you give those variables in within the state space model, then it'll choose those. So after D, if you give X, I'm just.
A much simpler problem. Why are these lists of lists? Why is it not just a single list of dependent variables?
No, because they're very different character. There's a state variables which are the actual dependent variables. Then there are input variables they use. Then there are output variables. But.
So how do I feed this to DSolve?
Well, if you feed it these. I mean, DSolve will not do very well on these mixed differential and algebraic equations.
What does this syntax mean? I mean, in other words, for DSolve, it has a syntax equation. Dependent variable, independent variable.
No, no. I mean, you could get it there. It's just that you've already substituted with sinusoid. Right. So you need to replace U1T with sine of T or whatever it was in the example.
Okay, but is there a version of DSolve that can eat this in this output here?
No, no, we had actually lists is all sort of, you know, you can have any mix of lists of equations and it will just flatten it all out and it.
No, I understand that, but I'm.
Okay, so can't you just apply dissolve to that or do we have too many lists?
No, you cannot.
You can't do it because the structure of those input, output, whatever things is more specific.
Yeah, yeah. So we'll have to actually substitute for the U and then use. Then we also have to add the initial conditions and then we can. Then we have to invoke dsolve value on the first argument. So the first. The first part of the first argument of the first argument of the first result. The first part of the first part is the equations and the second part are the values that we interested the output. The output variables.
Okay, so what I'm trying to understand is we're trying to feed state space model into dsolve value. Yes, and it's a total mess here because it'd be one thing if you know, state space models.
So one of the things. Here's one thing to be aware of though. The diesel value. Let's say that you have five differential equations, but I only really want to look at the third variable so I can have that as the second argument. So diesel value doesn't have to return all solution variables.
Right. In fact, you know, one of the examples I use is right, you know, get the list Y and Y prime and plot the solution in phase space.
Yes. Right.
So, right. It can be an arbitrary expression into the dependent and independent variables.
Yes. That's a feature of Diesel value, Stephen, that the second argument specify. What is it that I actually want to look at?
Oh, I know from the solution. I understand, but you're hackerating this because that sin X is a.
It's still hackerrated to some extent. Right.
Because.
So the only question is we could make it less hacky if we created a new container that says connect this sinusoid to the input.
Can I make a suggestion? Why not give D value and association as its first argument.
Yeah.
And then just have, you know, for the subsequent arguments. Yeah, right. You're going to have to give a T. Yeah. Somehow if there's an association for the first argument, don't give the second argument.
To argument D value.
I'm thinking, I mean, maybe. I'm not sure. But what the heck is that sign T doing there?
But that's a question you could ask about any D solve input, right? It's only you and I who know that something initial condition something is not.
No, no, no, no, no, no, no. The D solve normally has a collection of equations here. Sine T is not an equation. What the heck is it?
Sometimes you have an event and. Right.
Yes. It's an implicity equation. Right. It's input. It's the input function Equals. Equals sine of t I of t.
Equal to sine T. Basically.
Yeah, but.
But what I'd prefer to see is if state space model could be a sub value with sine of t or something. Something like that. Because that's basically specializing the state space model to have u of t or something b equal to sine of T. Is that not correct?
Yes, yes. It's saying that the input is now specific.
Right.
So why is that a sub value of state space model? Not some random weird.
Oh no, no, I see what you're saying that my sub value. You mean applying state space model to sine of t for example.
Yes. I mean, is that a bad idea?
I'm thinking.
That is probably a bad.
Idea because state space model may need different number of inputs for that too.
Yeah, it can take vector inputs for sure.
It's list then. But the form that it is right now is just not going to cut it.
No, I. I don't disagree, Stephen. Okay, but I. I think that we. But we don't also want. Yeah, we don't want a super heavy form. Like it could be a big association, which. But it's a bit heavy.
Then no, it's, it's too heavy. But the fact is that this is incomprehensible. So, I mean, for example. Well, here's a possibility. Okay. Which may or may not make sense. State space model. No, I mean, this is crazy. Okay. State state space model basically stands for when it appears in D cell value. Basically stands for this first argument here. That makes sense. And then our second argument is an association that has to anonymously refer to the X, U and Y values here because we don't want to have to name them. That's the whole point of using state space model is we don't have to go and pedantically name all the variables.
Yes.
So, okay, so what would it look like if that's what we did? If state space model represents the equations effectively.
Yes.
And then we have to say how we knit together different pieces and then we give the independent variable T last and then the result that we get is simply a function of T. Which is correct.
Yes, yes.
Okay, so what would be the second argument to make?
Right. So could, could we. Then we've learned before, so we tried everything. So could the sign go along with the output response?
Well, I mean, I'm. What I'm suggesting is that what this looks like is, you know, D cell value of this is just a single thing comma.
So, you know, association. I don't think we ever should have state response. I mean, if you want that make another state space model without an output.
I don't, I don't understand enough of that state space models to discuss that. But what I'm saying here is whatever knitting you need to say what the U of T is. What, what is U of T? What. What is that? What is the name of that thing?
It's like the input.
Yeah, the input signal.
Okay, well, I know that's a signal, but I mean in, in practice.
I mean, the weird thing is, is that right, you're specifying. You're using the second argument, which is normally the return thing, to return to specify things about the input, which is.
Well, that's bad.
Yeah, but it's okay for diesel value because sometimes you might say Y of T the whole square. So I mean, I, I kind of. This is exactly what was holding us back, that really the first argument of D solve value is supposed to contain all the information need to solve.
I mean, what it would it. Would you be happier if we took the current syntax but just instead of sine of T, it was the string input equals sine of t, then we have an equation yeah, that's fine.
We can do that.
Well, I'm not sure it's right though. I mean, but then what's the second argument? There's no freaking variable. We don't know what variable we're solving for because the variable has been elided.
Yes, but we don't need it, right?
I know we don't need it, but we, we. We don't need it. But what are we going to do with the second argument? Leave it out or what?
Well, because you have. Either have output or state or there are three other conveniences. There's ramp impulse and step response. These are kind of important special cases of response which we are now supporting. So there are five.
Okay, so there's two. There are two things then. So the second argument could be a string.
Yes.
Says what it is you're extracting.
Yes.
Or maybe a list of strings. Now the question is, how do you qualify the first argument with its additional information, which is basically here, the input, Correct. Yes. Okay, so what I would argue is, I mean, okay, look, if it's really just one thing like this, okay, I mean, maybe this is a horrifying idea, but what about the possibility of this? And this is. Now what would this be called? This would be called. Well, what are the possibilities for this, but what are the possibilities for what you are generating as output, please? Yes, sir.
Okay, so there are. Okay, there's state response, output response, ramp response.
Okay.
Okay, fine. So state response is a definite output. Yes, that's like a definite function that you might call, that you might want.
It's sort of just a named part that you want out. And we use formulas before because we had variables, so we could use formulas.
Okay, so what about this form here?
I'm fine with that. I think it's clear enough.
But so long as it's.
On some level, I feel like, I mean, maybe it's too obscure, but I feel like since sine of T is on the. Is the input, it should be on the left, left hand side.
Yeah, I think so too.
That's what I thought.
Oh, yeah, that's correct. That's a good.
Yeah. Or flip the arrow around.
Yeah, you're flipping. Yeah, I mean, you're. Well, I think.
Let's not flip the arrow. Let's not flip the arrow.
Yeah.
Is there a default for the sign of T?
Well, I think that the most important thing that people always look at is step, unit, step.
Okay, so that could be a default.
Yeah.
Okay.
This is a little weird. Take a think about this. I, I think this is a. This seems. It's better than we had before, but it's still a little weird.
It is a little weird. I. But it's not. I mean, what you. This is better than what we had. So I'm. I'm. I feel better about this.
Yeah. I mean, this is explainable. The first thing is the equation that is specified in terms of a state space model. The second thing is what the output is. And the third thing is the independent variable.
Yes. And I like the idea of that arrow because it says that you're kind of feeding that input into the state space model.
Yeah. Well, okay, let's try it out. All right, we got to go to another live stream here, guys. I don't know what both of. Some of you are in it, but I need to go to it at least. We're really late for it.
I am. Yeah.
Okay.
Thank you, Stephen. All right.
Thank you. Okay, See you guys soon.
Bye.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






