Tensor.Nat.check_eq: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/tensor.bend as Tensor Lines 109-117 of bendtorch@1.3.0.0/tensor.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/tensor.bend&start_line=109&end_line=117 import Base # a proof that a == b, when it holds (reshape's count, read at run time) def Nat.check_eq(a: Nat, b: Nat) -> Maybe<&1, {a == b : Nat}>: match a b: case 0n 0n: Some{{==}} case 1n+p 1n+q: nat_eq_succ(p, q, Nat.check_eq(p, q)) case _ _: None{} Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/tensor.bend&name=nat_eq_succ