chore: add helper functions

This commit is contained in:
Leonardo de Moura 2019-11-01 09:55:08 -07:00
parent 32fdea86d9
commit 431a5de2b0

View file

@ -246,6 +246,14 @@ def isAppOfArity : Expr → Name → Nat → Bool
| app f _, n, a+1 => isAppOfArity f n a
| _, _, _ => false
def appFn! : Expr → Expr
| app f _ => f
| _ => panic! "application expected"
def appArg! : Expr → Expr
| app _ a => a
| _ => panic! "application expected"
def constName! : Expr → Name
| const n _ => n
| _ => panic! "constant expected"