coq

    4熱度

    2回答

    考慮以下發展: Require Import Relation RelationClasses. Set Implicit Arguments. CoInductive stream (A : Type) : Type := | scons : A -> stream A -> stream A. CoInductive stream_le (A : Type) {eqA R : r

    1熱度

    2回答

    的概念,定義如下: Inductive eq (A : Type) (x : A) : A → Prop := eq refl : (eq x) x Parameter a b : A. 當我考慮它的實例eq a b之一,我讀A -> Prop類型的(eq a)。 那麼,我的問題是,(eq a) b如何確定a和b對應於同一個對象的事實? 對我而言,奇怪的是我們沒有關於(eq a)究竟做什麼

    0熱度

    1回答

    而在下面的引理使用ssreflect: From mathcomp Require Import ssreflect ssrfun ssrbool ssrnat eqtype. Lemma nat_dec n m: (m <= n) -> (~~ (m <= n)) -> False. Proof. intros A notA. (* auto. *) red

    0熱度

    1回答

    我想重寫一個假設,同時保留舊版本,並將重寫的結果保存在一個新名稱下。我應該怎麼做?

    1熱度

    1回答

    在證明一般(有Coq的8.5),我所執行的以下操作: Require Import Arith. Eval cbv delta in Nat.add_comm 3 7. 輸出是 Nat.add_comm 3 7 : 3 + 7 = 7 + 3 然而,Print Nat.add_comm.給出了一個長而複雜的功能以兩個NATS如輸入。我期望我的代碼擴大Nat.add_comm的定義,這是E

    2熱度

    1回答

    我被卡在一個目標上。 假設我們有如下定義: Fixpoint iota (n : nat) : list nat := match n with | 0 => [] | S k => iota k ++ [k] end. 我們要證明: Theorem t1 : forall n, In n (iota n) -> False. 到目前爲止,我已成功地執行

    3熱度

    1回答

    在Coq中有一個類型的層次結構,每個類型表示前一個類型,即Type_0:Type_1,Type_1:Type_2等等。在coqtop然而當我輸入Check Type.我得到Type : Type這看起來像一個矛盾,但不是因爲Type隱式索引。 問題:如何啓用Type Universe的顯式索引?

    3熱度

    1回答

    我感到困惑勒柯克的類型系統對的小時以下的定義證明長期的匹配部分的行爲: Set Implicit Arguments. Definition h := fun (a b : nat) (e : a = b) => (fun (x y : nat)(HC : b = y)(H : x = y) => (match H in (_ = y0) return (b = y0 -> b = x) w

    2熱度

    3回答

    如何在ltac中調用rewrite只重寫一個發生?我認爲coq的文檔提到了一些關於rewrite at的內容,但我在實踐中並沒有真正使用它,並且沒有例子。 這是什麼,我試圖做一個例子: Definition f (a b: nat): nat. Admitted. Theorem theorem1: forall a b: nat, f a b = 4. Admitted. Theor

    3熱度

    2回答

    爲了學習Coq,我下載了本傑明皮爾斯的電子書軟件基金會從here,並提取內容。我現在開始通過Basics.v的練習,直接在Vim中編輯文件。 我想自動評分我的答案(例如跟蹤我的分數和時間)。 爲此,我按照Makefile中給出的順序針對每個.v文件運行coqc。因此,我是now able to invoke,例如, coqtop -batch -l BasicsTest.v。 但是,雖然這會報告該