lean-crush

6.6. Known Boundaries🔗

lean-crush intentionally does not perform induction. Drive induction in Lean and invoke crush on the resulting cases.

Not every library function has a built-in encoding. Unsupported functions remain uninterpreted unless equation lemmas or a lowering are supplied. Operations such as Finset.card commonly need a theorem relating them to already-supported operations.

Indirectly recursive datatypes, such as a tree containing List Tree, may be represented opaquely. Constructor equality preprocessing recovers direct same-constructor injectivity, but nested discrimination can still require an explicit Lean lemma.

Finite arrays support local reads and updates. Operations that transform a symbolic range, including append, extract, map, and filter, generally need quantified lemmas or custom lowerings.

Bitvector theory requires a statically known width. A symbolic BitVec n is refused as a dependent type, even if the context proves 0 < n.

The error cannot translate the dependent type means that the goal, a hypothesis, or a lemma that crush uses mentions a type such as Fin n or a function of type (n : Nat) → β n. crush has no sound way to translate these types. Restate the goal so that the type does not appear, for example by stating a fact about Fin n as a fact about natural numbers below n, or prove the goal without crush.

Built-in sort keys also cannot capture a variable bound inside a translated quantifier or lambda. This includes quantified type variables: the translation cannot use one fixed SMT sort for all their possible instantiations. It also includes function domains containing bound propositions, such as p → Int under ∀ p : Prop, or (x > 0) → Int under ∀ x : Int.

Function values with proof domains, such as p → Int for p : Prop, are refused even when closed. Ordinary function sorts do not model proof irrelevance or the distinction between an impossible premise and a true one. Fully applied functions may still erase proof arguments when the existing guards permit it, and logical implications remain supported. Use those forms or supply a custom handler with a sound encoding.

Native higher-order solving is cvc5-only and has certificate gaps. Defunctionalization supports more backends, but its encoded function sorts need not contain every Lean function. Function-existence goals may therefore need a Lean witness before invoking SMT.