New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
Bartleby Related Questions Icon

Related questions

Question

Can you Fix this error in the following image 

Require Import Coq.Lists.List.
Import ListNotations.

Section LinkedList.

  Variable A : Type.

  Inductive LinkedList :=
  | LNil
  | LCons (x : A) (xs : LinkedList).

End LinkedList.

Section Append.

  Fixpoint append (xs ys : LinkedList) : LinkedList :=
    match xs with
    | LNil => ys
    | LCons x xs' => LCons x (append xs' ys)
    end.

End Append.

From iris.base_logic Require Import invariants.
From iris.proofmode Require Import tactics.

Section AppendProof.

  Context `{!inG Σ (authR (listUR A))}.

  Lemma append_nil_r (xs : LinkedList) : append xs LNil = xs.
  Proof.
    induction xs; simpl; auto.
  Qed.

  Lemma append_assoc (xs ys zs : LinkedList) :
    append (append xs ys) zs = append xs (append ys zs).
  Proof.
    induction xs; simpl; auto.
    rewrite IHxs. reflexivity.
  Qed.

  Lemma append_comm (xs ys : LinkedList) :
    append xs ys = append ys xs.
  Proof.
    induction xs; simpl; auto.
    rewrite IHxs. reflexivity.
  Qed.

  Lemma append_cons_r (x : A) (xs ys : LinkedList) :
    append xs (LCons x ys) = LCons x (append xs ys).
  Proof.
    induction xs; simpl; auto.
  Qed.

End AppendProof.



File
Edit View Navigation Templates Queries Tools Compile Debug Windows Help
projectfianl
ex_02_sumlist
Require Import Coq.Lists. List.
Import ListNotations.
Section LinkedList.
Variable A: Type.
Inductive LinkedList =
LNil
LCons (x: A) (xs LinkedList).
End LinkedList.
Section Append.
Fixpoint append (xs ys: LinkedList) : LinkedList :=
match xs with
LNil => ys
| LCons x xs' => LCons x (append xs' ys)
end.
End Append.
From iris.base_logic Require Import invariants.
From iris.proofmode Require Import tactics.
Section AppendProof.
Context
inG E (authR (listUR A))).
Lemma append_nil_r (xs: LinkedList)
Proof.
induction xs; simpl; auto.
Qed.
append xs LNil xs.
Lemma append_assoc (xs ys zs LinkedList) :
append (append xs ys) zs = append xs (append ys zs).
Proof.
induction xs; simpl; auto.
rewrite IHxs. reflexivity.
Qed.
Lemma append_comm (xs ys: LinkedList) :
append xs ys = append ys xs.
Proof.
induction xs; simpl; auto.
rewrite IHxs. reflexivity.
Qed.
Lemma append_cons_r (x: A) (xs ys: LinkedList) :
append xs (LCons x ys) = LCons x (append xs ys).
Proof.
induction xs: simpl: auto.
Messages
Errors
Jobs
The term "LinkedList" has type "Type -> Type" which should be Set, Prop or Type.
expand button
Transcribed Image Text:File Edit View Navigation Templates Queries Tools Compile Debug Windows Help projectfianl ex_02_sumlist Require Import Coq.Lists. List. Import ListNotations. Section LinkedList. Variable A: Type. Inductive LinkedList = LNil LCons (x: A) (xs LinkedList). End LinkedList. Section Append. Fixpoint append (xs ys: LinkedList) : LinkedList := match xs with LNil => ys | LCons x xs' => LCons x (append xs' ys) end. End Append. From iris.base_logic Require Import invariants. From iris.proofmode Require Import tactics. Section AppendProof. Context inG E (authR (listUR A))). Lemma append_nil_r (xs: LinkedList) Proof. induction xs; simpl; auto. Qed. append xs LNil xs. Lemma append_assoc (xs ys zs LinkedList) : append (append xs ys) zs = append xs (append ys zs). Proof. induction xs; simpl; auto. rewrite IHxs. reflexivity. Qed. Lemma append_comm (xs ys: LinkedList) : append xs ys = append ys xs. Proof. induction xs; simpl; auto. rewrite IHxs. reflexivity. Qed. Lemma append_cons_r (x: A) (xs ys: LinkedList) : append xs (LCons x ys) = LCons x (append xs ys). Proof. induction xs: simpl: auto. Messages Errors Jobs The term "LinkedList" has type "Type -> Type" which should be Set, Prop or Type.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage