Question: ` ` ` Set Default Goal Selector ! . Require Import Coq.Strings.Ascii. Require Import Coq.Lists.List. Import ListNotations. Open scope char _ scope. Require
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.
Admitted.
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.
Admitted.
Consider using one of the lemmas you have just proved.
When your goal is In Cgrammarrules gl 'simpl; auto
should solve it
Theorem glrule:
Hwutil.Yield gC; C;
Proof.
Admitted.
Consider using one of the lemmas you have just proved.
When your goal is In Cgrammarrules gl 'simpl; 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 glsimpl; auto
should solve it
Theorem grule:
Hwutil.YieldgC
Proof.
Admitted.
The proof should proceed by inversion and then case analysis on
string u
Theorem yieldinvstart:
forall G w HwtilYield G Hwutil.grammarstart G w In HwUtil.grammarstart G wHwUtil.gramma
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.ield g; C; ; C; ; C
Proof.
Admitted.
l
The idea is to use either: yieldleftyieldright or yielddef
Theorem gstep:
Hwutil.ield g; ; C; ; ; C;
Proof.
Admitted.
The idea is to use either: yieldleftyieldright or yielddef
Theorem gstep:
Hwutil.ield g; ; ; C; ; ; ;
Proof.
Admitted.
Use either derivationnil or derivationcons
Theorem gder:
Hwutil.DDerivation 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 al der :
Theorem glder:
HwUtil.Derivation g
; ; ; C; ;
; ; C;
; C; ; C;
C; C;
C
Proof.
Admitted.
Theorem gder:
Hwutil. Derivation g
; ; ; ;
; ; ; C; ;
; ; C;
; C; ; C;
C; C;
C
Proof.
Admitted.
beginarrayl
text Use
text
endarray
Theorem exl:
Accept g; ; ;
Proof.
Admitted.
Require Import Coq.Strings.Ascii.
Require Import Coq.Lists.List.
Import ListNotations.
Open Scope charscope.
Definition rule :ascii list ascii type.
Structure grammar :
grammarvars : list ascii;
grammarterminals : list ascii;
grammarrules : list rule;
grammarstart : ascii;
Definition g :
grammarvars :C;
grammarterminals :; ;
grammarstart :C;
grammarrules :
C
