Uninferred Binder Type Due to Resulting Type Annotation
defplusTwoFailed to infer type of binder `x`Note: Because this declaration's type has been explicitly provided, all parameter types and holes (e.g., `_`) in its header are resolved before its body is processed; information from the declaration body cannot be used to infer what these values should bex:Nat:=x+2
Failed to infer type of binder `x`Note: Because this declaration's type has been explicitly provided, all parameter types and holes (e.g., `_`) in its header are resolved before its body is processed; information from the declaration body cannot be used to infer what these values should be
尽管 x 被推断为 plusTwo 主体中的类型为 Nat,但此信息不是
在详细说明定义的类型时可用,因为其结果类型 (Nat) 已
明确指定。仅考虑标头中的信息,无法确定 x 的类型
确定,导致显示的错误。因此,有必要将 x 的类型包含在
它的活页夹。
Attempting to Name an Example Declaration
exampleFailed to infer type of binder `trivial_proof`Note: Examples do not have names. The identifier`trivial_proof`is being interpreted as a parameter`(trivial_proof : _)`.trivial_proof:True:=trivial
Failed to infer type of binder `trivial_proof`Note: Examples do not have names. The identifier`trivial_proof`is being interpreted as a parameter`(trivial_proof : _)`.
此代码无效,因为它尝试为 example 声明指定名称。例子不能
被命名,并且在其他声明形式中出现名称的地方写入标识符
被详细精化为粘合剂,其类型无法推断。如果必须命名声明,则应该是
使用支持命名的声明形式定义,例如 def 或 theorem。
Attempting to Define Multiple Opaque Constants at Once
opaquemFailed to infer type of binder `n`Note: Multiple constants cannot be declared in a single declaration. The identifier`n`is being interpreted as a parameter`(n : _)`.n:Nat
Failed to infer type of binder `n`Note: Multiple constants cannot be declared in a single declaration. The identifier`n`is being interpreted as a parameter`(n : _)`.