@[inline]
Equations
- Lean.Expr.const? e = match e with | Lean.Expr.const n us => some (n, us) | x => none
Instances For
@[inline]
Equations
- Lean.Expr.app1? e fName = if Lean.Expr.isAppOfArity e fName 1 = true then some (Lean.Expr.appArg! e) else none
Instances For
@[inline]
Equations
- Lean.Expr.app2? e fName = if Lean.Expr.isAppOfArity e fName 2 = true then some (Lean.Expr.appArg! (Lean.Expr.appFn! e), Lean.Expr.appArg! e) else none
Instances For
@[inline]
Equations
- Lean.Expr.eqOrIff? p = match Lean.Expr.app3? p `Eq with | some (fst, lhs, rhs) => some (lhs, rhs) | x => Lean.Expr.iff? p
Instances For
@[inline]
Equations
- Lean.Expr.notNot? p = match Lean.Expr.not? p with | some p => Lean.Expr.not? p | none => none
Instances For
Equations
- Lean.Expr.natAdd? e = Lean.Expr.app2? e `Nat.add
Instances For
@[inline]
Equations
- Lean.Expr.arrow? x = match x with | Lean.Expr.forallE binderName α β binderInfo => if Lean.Expr.hasLooseBVars β = true then none else some (α, β) | x => none
Instances For
Equations
- Lean.Expr.isEq e = Lean.Expr.isAppOfArity e `Eq 3
Instances For
Equations
- Lean.Expr.isHEq e = Lean.Expr.isAppOfArity e `HEq 4
Instances For
Equations
- Lean.Expr.isIte e = Lean.Expr.isAppOfArity e `ite 5
Instances For
Equations
- Lean.Expr.isDIte e = Lean.Expr.isAppOfArity e `dite 5
Instances For
Equations
Instances For
Equations
- Lean.Expr.arrayLit? e = if Lean.Expr.isAppOfArity' e `List.toArray 2 = true then Lean.Expr.listLit? (Lean.Expr.appArg!' e) else none