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.
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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F672bf286-8abe-4b07-9ca1-0d5b2612956c%2Fad1f3c5b-2e4e-43d1-98fa-a9ee2cc72c9f%2Fyr2sqod_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![Systems Architecture](https://www.bartleby.com/isbn_cover_images/9781305080195/9781305080195_smallCoverImage.gif)
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![Systems Architecture](https://www.bartleby.com/isbn_cover_images/9781305080195/9781305080195_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)