Lean 语言参考

14.1. 运行策略🔗

syntaxTactic Proofs with by

策略包含在使用 Lean.Parser.Term.byTactic : term`by tac` constructs a term of the expected type by running the tactic(s) `tac`. by 的术语中,后跟策略的序列,其中每个序列具有相同的缩进:

term ::= ...
    | `by tac` constructs a term of the expected type by running the tactic(s) `tac`. by
      A sequence of tactics in brackets, or a delimiter-free indented sequence of tactics.
Delimiter-free indentation is determined by the *first* tactic of the sequence. tacticSeq

或者,可以使用明确的大括号和分号:

term ::= ...
    | `by tac` constructs a term of the expected type by running the tactic(s) `tac`. by A sequence of tactics in brackets, or a delimiter-free indented sequence of tactics.
Delimiter-free indentation is determined by the *first* tactic of the sequence. The syntax `{ tacs }` is an alternative syntax for `· tacs`.
It runs the tactics in sequence, and fails if the goal is not solved. { tactic* }

策略使用 Lean.Parser.Term.byTactic : term`by tac` constructs a term of the expected type by running the tactic(s) `tac`. by 术语调用。 当精化器遇到 Lean.Parser.Term.byTactic : term`by tac` constructs a term of the expected type by running the tactic(s) `tac`. by 时,它会调用策略解释器来构造结果项。 策略证明可以通过 Lean.Parser.Term.byTactic : term`by tac` constructs a term of the expected type by running the tactic(s) `tac`. by 嵌入到术语可能出现的任何上下文中。