Zulip Chat Archive

Stream: new members

Topic: Exhaustively define matrix / function


Shi Zhengyu (Jan 03 2022 at 03:07):

Dear all,

I am not sure if this is the right way to put it, but what is the best way to define a matrix by explicitly writing out its contents? Or, since finite matrix is just a bivariate function (fin u) -> (fin v) -> \N, how do I define a function with finite domain by exhausting its range?

i.e. I am looking for notations like def A: FinMat := [[1, 0, 0], [0, 1, 0], [0, 0, 1]] for a matrix ...

Many Thanks!

Heather Macbeth (Jan 03 2022 at 03:14):

![![1, 0, 0], ![0, 1, 0], ![0, 0, 1]]

Heather Macbeth (Jan 03 2022 at 03:14):

After first

import data.matrix.notation

Heather Macbeth (Jan 03 2022 at 03:15):

You nearly guessed it! :)

Shi Zhengyu (Jan 03 2022 at 03:16):

Thanks! :D


Last updated: Dec 20 2023 at 11:08 UTC