feat: Partial fromDualRep_tensor

This commit is contained in:
jstoobysmith 2024-11-18 06:45:52 +00:00
parent 2c26584cfc
commit 5fc5946530
5 changed files with 65 additions and 10 deletions

View file

@ -195,8 +195,10 @@ def getNoIndicesExact (stx : Syntax) : TermElabM := do
let a' ← whnf a
match a' with
| Expr.lit (Literal.natVal n) => return n
|_ => throwError "Could not extract number of indices from tensor (getNoIndicesExact). "
| _ => throwError "Could not extract number of indices from tensor (getNoIndicesExact). "
|_ => throwError s!"Could not extract number of indices from tensor
{stx} (getNoIndicesExact). "
| _ => throwError s!"Could not extract number of indices from tensor
{stx} (getNoIndicesExact). "
| _ => return 1
| k => return k