Programming in Lean
Release 3.4.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.5 Metavariables and Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6 Writing Automation processes. Lean employs a number of carefully chosen devices to support a clean and principled unification of the two worlds. Chief among these is the inclusion of a type Prop of propositions, or assertions expressions, instantiating metavariables if necessary. Note the use of the orelse notation: if the unification fails, the procedure backtracks and continues to try the remaining elements on the list. The fail0 码力 | 51 页 | 220.07 KB | 1 年前3
Lean 2 Quick Referenceunfold at any time during elaboration if necessary quasireducible : unfold during higher order unification, but not during type class resolution semireducible : unfold when performance is not critical irreducible: like apply, but create subgoals also for dependent premises that were not assigned by unification procedure eapply : like apply, but used for applying recursor-like definitions exact 0 码力 | 9 页 | 62.97 KB | 1 年前3
The Hitchhiker’s Guide to
Logical Verificationconstraints involving type variables ?α, ?β, ?γ, ..., and attempts to solve them using a type unification procedure. For example, when inferring the type ?α of λx , abs x , Lean would perform the following to instantiate variables to make two terms syntac- tically equal is called unification. Matching is a special case of unification where 2.3. Reasoning about Connectives and Quantifiers 27 one of the two two terms contains no variables. In practice, goals with variables are rare, so Lean’s unification usually amounts to matching. (Incidentally, whenever ?m_ variables appear in goals, additional subgoals0 码力 | 215 页 | 1.95 MB | 1 年前3
An Introduction to Leanprocesses. Lean employs a number of carefully chosen devices to support a clean and principled unification of the two worlds. Chief among these is the inclusion of a type Prop of proposi- tions, or assertions0 码力 | 48 页 | 191.92 KB | 1 年前3
Theorem Proving in Lean
Release 3.23.0occur, has type α → Prop. Inferring this predicate therefore requires an instance of higher-order unification. In full generality, the problem of determining whether a higher-order unifier exists is undecidable ambiguities arise in inferring induction predicates, or inferring function arguments. Even second-order unification is known to be undecidable. Lean therefore relies on heuristics to fill in such arguments, and0 码力 | 173 页 | 777.93 KB | 1 年前3
The Lean Reference Manual
Release 3.3.0t finds the first goal whose target unifies with t. It makes that the main goal, performs the unification, and replaces the target with the unified version of t. from expr A synonym for exact that allows0 码力 | 67 页 | 266.23 KB | 1 年前3
共 6 条
- 1













