Spec.frob: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/spec.bend as Spec Lines 60-66 of bendtorch@1.3.0.0/spec.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/spec.bend&start_line=60&end_line=66 import Base # the sum of the products of matching entries of two matrices (Frobenius inner product) def frob(a: List<&2, List<&2, Nat>>, b: List<&2, List<&2, Nat>>) -> Nat: match a b: case Con{ar, at} Con{br, bt}: Nat.add(dotn(ar, br), frob(at, bt)) case _ _: 0n Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=bendtorch@1.3.0.0/spec.bend&name=dotn