Question: I need the full code explained and answered please - ( * ##################################################### ### PLEASE DO NOT DISTRIBUTE SOLUTIONS PUBLICLY ### ##################################################### * ) Set
I need the full code explained and answered please
#####################################################
### PLEASE DO NOT DISTRIBUTE SOLUTIONS PUBLICLY ###
#####################################################
Set Default Goal Selector
Require Import Coq.Strings.Ascii.
Require Import Coq.Lists.List.
Import ListNotations.
Open Scope charscope.
Require Import HwUtil.
Use yielddef
Theorem yieldeq:
forall G A w List.In A wHwUtil.grammarrules G HwUtil.Yield G A w
Proof.
intros G A w H
apply HwUtil.Yielddef.
exists w
split; assumption reflexivity
Qed.
Use yielddef and appassoc to correct the parenthesis.
Theorem yieldright:
forall G w w r w w HwUtil.Yield G w w w w r w w r HwUtil.Yield G w w
Proof.
Admitted.
Similar proof than yieldright but you should rewrite with
appassoc after using yielddef not before.
Theorem yieldleft:
forall G w w l w w HwUtil.Yield G w w w l w w l w HwUtil.Yield G w w
Proof.
intros G w w r w w HYield H H
rewrite H H
apply yielddef in HYield.
Admitted.
Consider using one of the lemmas you have just proved.
When your goal is In Cgrammarrules gsimpl; auto
should solve it
Theorem grule:
HwUtil.Yield gC; C;
Proof.
simpl; auto.
Qed.
Admitted.
Consider using one of the lemmas you have just proved.
When your goal is In Cgrammarrules gsimpl; auto
should solve it
Theorem grule:
HwUtil.Yield gCC; C
Proof.
Admitted.
Consider using one of the lemmas you have just proved.
When your goal is In Cgrammarrules gsimpl; auto
should solve it
Theorem grule:
HwUtil.Yield gC
Proof.
Admitted.
The proof should proceed by inversion and then case analysis on
string u
Theorem yieldinvstart:
forall G w HwUtil.Yield G HwUtil.grammarstart G w In HwUtil.grammarstart G wHwUtil.grammarrules G
Proof.
Admitted.
You will want to use yieldinvstart Recall that that ListIn
simplifies to a series of disjunctions.
Theorem gex:
~ HwUtil.Yield gC
Proof.
Admitted.
The idea is to use either: yieldleftyieldright or yielddef
Theorem gstep:
HwUtil.Yield gC; C; C; ; C
Proof.
Admitted.
The idea is to use either: yieldleftyieldright or yielddef
Theorem gstep:
HwUtil.Yield g; C; ; C; ; C
Proof.
Admitted.
The idea is to use either: yieldleftyieldright or yielddef
Theorem gstep:
HwUtil.Yield g; ; C; ; ; C;
Proof.
Admitted.
The idea is to use either: yieldleftyieldright or yielddef
Theorem gstep:
HwUtil.Yield g; ; ; C; ; ; ;
Proof.
Admitted.
Use either derivationnil or derivationcons
Theorem gder:
HwUtil.Derivation gC
Proof.
Admitted.
Use either derivationnil or derivationcons
Theorem gder:
HwUtil.Derivation gC; C; C
Proof.
Admitted.
Use either derivationnil or derivationcons
Theorem gder:
HwUtil.Derivation g; C; ; C; C; C; C
Proof.
Admitted.
Theorem gder:
HwUtil.Derivation g
; ; C;
; C; ; C;
C; C;
C
Proof.
Admitted.
Theorem gder:
HwUtil.Derivation g
; ; ; C; ;
; ; C;
; C; ; C;
C; C;
C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
