An Introduction to Leandistributivity of multiplication over addition. Lean supports another style of writing proofs, namely, using tactics. These are instructions, or procedures, that tell Lean how to construct the requisite expression virtual machine, however, handles calls to the API appropriately. This makes it possible to write Lean tactics in Lean itself. For example, the procedure contra_aux searches through two lists of expressions the environment. Substantial tactics can be written in such a way, even, as noted above, a full-blown resolution theorem prover. Indeed, many of Lean's core tactics are implemented in Lean itself0 码力 | 48 页 | 191.92 KB | 2 年前3
Lean 2 Quick Referencefor calc-expressions, tactics and simplifier symm : symmetry lemma, used for calc-expressions, tactics and simplifier trans : transitivity lemma, used for calc-expressions, tactics and simplifier subst have : introduce auxiliary fact (opaque, in the body) assert : like "have", but visible to tactics show : make result type explicit suffices : show that the goal follows from this fact obtain ... ## Tactic Mode At any point in a proof or definition you can switch to tactic mode and apply tactics to finish that part of the proof or definition. begin ... end : enter tactic mode, and blocking0 码力 | 9 页 | 62.97 KB | 2 年前3
The Hitchhiker’s Guide to
Logical VerificationProofs 21 2.1 Tactic Mode 22 2.2 Basic Tactics 23 2.3 Reasoning about Connectives and Quantifiers 26 2.4 Reasoning about Equality 29 2.5 Rewriting Tactics 30 2.6 Proofs by Mathematical Induction Induction 31 2.7 Induction Tactic 33 2.8 Cleanup Tactics 33 2.9 Summary of New Lean Constructs 34 3 Forward Proofs 35 3.1 Structured Proofs 35 3.2 Structured Constructs 37 3.3 Forward Reasoning about Connectives and Quantifiers 39 3.4 Calculational Proofs 41 3.5 Forward Reasoning with Tactics 42 3.6 Dependent Types 44 3.7 The PAT Principle 45 3.8 Induction by Pattern Matching 47 30 码力 | 215 页 | 1.95 MB | 2 年前3
The Lean Reference Manual
Release 3.3.041 5.6 Instructions .42 5.7 Notation Declarations .43 6 Tactics .45 6.1 Tactic Mode .45 6.2 Basic Tactics .46 6.3 Equality and Other Relations .49 6.4 Structured Tactic Proofs Combinators .53 6.7 The Rewriter .53 6.8 The Simplifier and Congruence Closure .54 6.9 Other Tactics .55 6.10 Conversions .56 6.11 The SMT State .56 7 Programming .57 7.1 The Virtual style of writing proofs is most effective when it is used in conjunction with the simp and rewrite tactics. ### 3.7 Computation Two expressions that differ up to a renaming of their bound variables are0 码力 | 67 页 | 266.23 KB | 2 年前3
Programming in Lean
Release 3.4.2monad 25 4.3 The state monad 26 4.4 The IO monad 29 4.5 Related type classes 29 5 Writing Tactics 31 5.1 A First Look at the Tactic Monad 31 5.2 Names and Expressions 34 5.3 Examples 39 5 <|> b to have the value a if a is of the form some $ a_{0} $ , and b otherwise. ## WRITING TACTICS ### 5.1 A First Look at the Tactic Monad The canonical way to invoke a tactic in Lean is to use and the option monad. Because it is a monad, we have the usual do notation. So, if r, s, and t are tactics, you should think of do a ← r, b ← s, t as meaning “apply tactic r to the state, and store the0 码力 | 51 页 | 220.07 KB | 2 年前3
Theorem Proving in Lean
Release 3.23.0Quantifier 4.5 More on the Proof Language 4.6 Exercises 5 Tactics 5.1 Entering Tactic Mode 5.2 Basic Tactics 5.3 More Tactics 5.4 Structuring Tactic Proofs 5.5 Tactic Combinators ..... 68 101 7.4 Defining the Natural Numbers ..... 102 7.5 Other Recursive Data Types ..... 105 7.6 Tactics for Inductive Types ..... 106 7.7 Inductive Families ..... 111 7.8 Axiomatic Details ..... 113 style of writing proofs is most effective when it is used in conjunction with the simp and rewrite tactics, which are discussed in greater detail in the next chapter. For example, using the abbreviation rw0 码力 | 173 页 | 777.93 KB | 2 年前3
The Idris Tutorial Version 0.99favor of Elaborator Reflection (page 157). Idris also supports interactive theorem proving via tactics. This is generally not recommended to be used directly, but rather used as a mechanism for building proof automation which is beyond the scope of this tutorial. In this section, we briefly discuss tactics. One way to write proofs interactively is to write the general structure of the proof, and use the here) and the current goal (below the line; named $ \{hole0\} $ here). At the prompt we can enter tactics to direct the construction of the proof. In this case, we can normalise the goal with the compute0 码力 | 182 页 | 1.04 MB | 2 年前3
The Idris Tutorial Version 2.3.0in favor of Elaborator Reflection (page 203). Idris also supports interactive theorem proving via tactics. This is generally not recommended to be used directly, but rather used as a mechanism for building proof automation which is beyond the scope of this tutorial. In this section, we briefly discus tactics. One way to write proofs interactively is to write the general structure of the proof, and use the none here) and the current goal (below the line; named {hole0} here). At the prompt we can enter tactics to direct the construction of the proof. In this case, we can normalise the goal with the compute0 码力 | 228 页 | 1.23 MB | 2 年前3
The Idris Tutorial Version 1.0.1favor of Elaborator Reflection (page 197). Idris also supports interactive theorem proving via tactics. This is generally not recommended to be used directly, but rather used as a mechanism for building proof automation which is beyond the scope of this tutorial. In this section, we briefly discuss tactics. One way to write proofs interactively is to write the general structure of the proof, and use the here) and the current goal (below the line; named $ \{hole0\} $ here). At the prompt we can enter tactics to direct the construction of the proof. In this case, we can normalise the goal with the compute0 码力 | 223 页 | 1.21 MB | 2 年前3
The Idris Tutorial Version 1.1.0favor of Elaborator Reflection (page 197). Idris also supports interactive theorem proving via tactics. This is generally not recommended to be used directly, but rather used as a mechanism for building proof automation which is beyond the scope of this tutorial. In this section, we briefly discuss tactics. One way to write proofs interactively is to write the general structure of the proof, and use the here) and the current goal (below the line; named $ \{hole0\} $ here). At the prompt we can enter tactics to direct the construction of the proof. In this case, we can normalise the goal with the compute0 码力 | 223 页 | 1.21 MB | 2 年前3
共 68 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
相关搜索词
Leandependent type theorytacticsmetaprogrammingautomationLean 2commandsquick referenceEmacs modetheorem provingtacticHoare logicformal proofVSCodeEmacstheorempackage managerLean编程语言归纳构造演算单子输入输出函数定义定理证明依赖类型理论命题策略定理Idris依赖类型函数式编程Vect类型Effects库dependent typesinteractive environmentimplicit conversionsforeign function calls副作用处理纯函数副作用矢量类型













