466 karma · joined March 20, 2020
If everyone only wrote about their successes, we'd all have to independently rediscover failures behind closed doors.
---
Let x_n be a sequence defined by the recurrence relation:
x_{n+1} = a * x_{n-1} + b * x_n
Observe that if we define a sequence of two-element vectors of successive elements: [x_0] [x_1] [x_2]
[x_1], [x_2], [x_3], ...
then we can form the relation in terms of matrix/vector multiplication: [x_1] = [[0 1]] [x_0]
[x_2] [[a b]] [x_1]
Let's name the sequence of vectors as y_n and call the matrix M: y_1 = M * y_0
We can get the next term in the sequence with another multiplication: y_2 = M * y_1
= M * (M * y_0)
= M^2 * y_0
By induction we have: y_n = M^n * y_0
M has characteristic polynomial: r^2 - br - a = 0
with roots: r_1 = (b - c)/2
r_2 = (b + c)/2
c = √(b^2 + 4a)
Therefore we have by diagonalization: y_n = S * [[r_1^n 0 ]] * S^(-1) * y_0
[[0 r_2^n]]
where S is the matrix of eigenvectors. From here, we can finish our existence and uniqueness proofs from the existence and uniqueness of the eigenvalues of M.I assume so. I didn't even notice that the article didn't motivate that `async: false` is bad. I always avoid it if I can since you might as well perform independent tests concurrently.
From the docs [1]:
* `:async` - configures tests in this module to run concurrently with tests in other modules. Tests in the same module never run concurrently. It should be enabled only if tests do not change any global state. Defaults to `false`.
[1]: https://hexdocs.pm/ex_unit/main/ExUnit.Case.html#module-tags
It also gives me some good follow up material to read. I’m particularly interested in that one link that forms subqueries and lateral joins in terms of a new “dependent join” operator.
From a quick glance, it looks like it covers much of the same material as this text [1]. I wonder how they compare.
[1]: https://www.cambridge.org/core/books/understanding-machine-l...
(Never used Pkl myself...)
And even if I use an alternative, my friends, family, and workplace do not. So I'm still fighting the use of Google products after I stop using them.
[0]: https://en.wikipedia.org/wiki/Vector_space
[1]: https://en.wikipedia.org/wiki/Vector_space#/media/File:Deter...
However I fear it may not be low-level enough for what I'm hoping to do. Since I can't edit the OP, I'll reply to it with examples of what I'm hoping to achieve.
For instance, one person's approach could be to use the Inkscape software to create SVGs. Another approach could be to use JS to call the Canvas API. Another is to use Tikz.
Because there are so many approaches, each requiring a heavy investment in learning, I was curious if any in the HN crowd have strong preferences.
Sidenote: I recommend linear algebra done wrong over Axler’s text. But that was just my personal preference. Both would be good introductions.
[1]: https://en.wikipedia.org/wiki/Post-quantum_cryptography
lemma LemmaFromToBytes(v: nat)
ensures FromBytes(ToBytes(v)) == v {
// Dafny does all the work!
}
The compiler can _prove_ one function is the inverse of another? That's so cool.Also I disagree with some of the other posts dismissing the usefulness of this kind of thing. I grant that formally verifying every little piece of my code would be overkill. However, I absolutely want certain core pieces of my application formally verified.
I'm gonna have to play with Dafny at some point.