BendTensors.MatT.Padded: def of bend-tensors@0.0.0.2 Import: import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors Lines 1592-1605 of bend-tensors@0.0.0.2/bend_tensors.bend: https://jend.leeeet.dev/read.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&start_line=1592&end_line=1605 import Base def MatT.Padded(+r: Nat, +c: Nat, m: MatT(r, c), +i0: Nat, +j0: Nat, +rows: Nat, +cols: Nat) -> Type: match r c: case 0n 0n: MatB{b} = m Blk.Padded(Nat.sub(rows, i0), Nat.sub(cols, j0), b) case 1n+p 0n: MatR{t, b} = m MatT.Padded(p, 0n, t, i0, j0, rows, cols) & MatT.Padded(p, 0n, b, Nat.add(i0, VecT.size(p)), j0, rows, cols) case 0n 1n+q: MatC{l, rt} = m MatT.Padded(0n, q, l, i0, j0, rows, cols) & MatT.Padded(0n, q, rt, i0, Nat.add(j0, VecT.size(q)), rows, cols) case 1n+p 1n+q: MatQ{a, b, c2, d} = m (MatT.Padded(p, q, a, i0, j0, rows, cols) & MatT.Padded(p, q, b, i0, Nat.add(j0, VecT.size(q)), rows, cols)) & (MatT.Padded(p, q, c2, Nat.add(i0, VecT.size(p)), j0, rows, cols) & MatT.Padded(p, q, d, Nat.add(i0, VecT.size(p)), Nat.add(j0, VecT.size(q)), rows, cols)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Blk.Padded https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=MatT https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=MatT.Cols https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=MatT.Leaf https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=MatT.Quad https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=MatT.Rows https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=VecT.size