我無法證明使用coq的策略的簡單邏輯max a b <= a+b。我應該如何解決它?以下是我到現在爲止的代碼。 s_le_n已被證明,但爲簡單起見,此處未提及。 Theorem s_le_n: forall (a b: nat), a <= b -> S a <= S b.
Proof. Admitted.
Theorem max_sum: forall (a b: nat), max a
我有一個string b和string a上比較,如果有平等的string c,否則有string x。我知道的假設fun x <= fun c。我如何證明以下陳述? fun是一些函數,它發生在string並返回nat。 fun (if a == b then c else x) <= S (fun c)
的邏輯似乎是顯而易見的,但我無法將拆分COQ的if語句。任何幫助,將不勝感激。 謝謝!
我需要在綁定器下泛化表達式。例如,我有我的目標,兩個表達式: (fun a b => g a b c)
和 (fun a b => f (g a b c))
我想概括g _ _ c部分: 一種方法做的是第一重寫它們分爲: (fun a b => (fun x y => g x y c) a b)
第二入: (fun a b =>
f (
(fun x y => g
我想了解如何從運算可計算函數的定理轉移到使用歸納定義關係來表示計算的定理。考慮下面這個簡單的開發。讓我們先從關係及其屬性的標準定義: Definition relation (X : Type) := X -> X -> Prop.
Definition reflexive {X : Type} (R : relation X) :=
forall a, R a a.
Defin
我試圖證明以下等式: Lemma Foo (A : Type) (n : nat) (gen : forall p : nat, p < S n -> A)
(ic0 : 0 < S n) (ic1 : 0 mod S n < S n):
gen (n - n) ic1 = gen 0 ic0.
的n-n值爲0 Nat.sub_diag和0 mod S n也爲0的Nat.mod_0