lean

    2热度

    2回答

    我不明白为什么这不起作用: 类: public abstract class BaseObj { public bool IsValid => GetValidationErrors().Count == 0; } public class BaseObjWithId: BaseObj { public int Id { get; set; } } publi

    0热度

    4回答

    谁能告诉我为什么下面的代码打印1高街,而不是1的高街?: String propertyPageTitle = "1-the-high-street"; propertyPageTitle = propertyPageTitle.replace("-", " "); WordUtils.capitalizeFully(propertyPageTitle); Syste

    5热度

    1回答

    我尝试使用感应数据类型的语法,但它得到一条错误消息“互感类型必须编译为具有相关消除的基本归纳类型”。 下面是我尝试的例子对自然数 mutual inductive even, odd with even: ℕ → Prop | z: even 0 | n: ∀ n, odd n → even (n + 1) with odd: ℕ → Prop | z: odd 1 | n: ∀ n,

    2热度

    1回答

    下面的定义是由精益拒绝: inductive natlist | nil : natlist | cons: natlist → ℕ → natlist 与错误消息“ARG# 'natlist.cons' 的2不是递归的,但它的递归参数之后发生” 如预期的那样,接受以下定义: inductive natlist | nil : natlist | cons: ℕ → natlist →

    4热度

    1回答

    我有一个使用单击DO图像的Rails应用程序。 我可以成功运行任何rake db:*,但是当我运行rails console时我无法连接到db。 我该如何解决?该应用程序工作正常。所以我认为是一个rails console的问题。 控制台输出: deployer:/home/rails$ RAILS_ENV=production bundle exec rake db:migrate A

    2热度

    1回答

    嗨,我想在精益证明助手中做一些数学,看看它是如何工作的。我决定玩一个交换戒指的幂等物应该很有趣。下面是我的尝试: variables (A : Type) (R : comm_ring A) definition KR : Type := \Sigma x : A, x * x = x 然后我得到的错误 failed to synthesize placeholder A : Type,

    1热度

    1回答

    我无法理解如何触发精益类型类的使用。这里是一个小例子,企图: section the_section structure toto [class] (A : Type) := (rel : A → A → Prop) (Hall : ∀ a, rel a a) definition P A := exists (a : A), forall x, x = a parameter A : T

    1热度

    2回答

    我想定义一个归纳类型,可以从精益本身的列表构建。然而 inductive a : Type := | aFromAs : list a → a 给出了错误: failed to infer inductive datatype resultant universe, provide the universe levels explicitly 精细,所以我set_option pp.un

    1热度

    1回答

    如何使用战术模式形状 H : exists x, P x 的假设是什么?在长期模式,我会用 obtain x Hx, from H,

    2热度

    2回答

    我正在通过lean tutorial的第4章。 我希望能够证明简单的平等性,如a = b → a + 1 = b + 1而不需要必须使用calc环境。换句话说,我想明确地构建的证明期限: example (a b : nat) (H1 : a = b) : a + 1 = b + 1 := sorry 我最好的猜测是,我需要使用eq.subst和有关标准库中的自然数平等一些相关的引理,但我不知所措