-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathcmlNTPropsScript.sml
834 lines (747 loc) · 28.8 KB
/
cmlNTPropsScript.sml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
(*
Properties (first sets etc) for non-terminals in the CakeML grammar
*)
open HolKernel Parse boolLib bossLib;
open preamble
open NTpropertiesTheory gramTheory gramPropsTheory
val _ = new_theory "cmlNTProps";
val _ = set_grammar_ancestry ["gramProps"]
Triviality disjImpI:
~p \/ q ⇔ p ⇒ q
Proof
DECIDE_TAC
QED
Theorem firstSet_nUQTyOp[simp]:
firstSet cmlG (NN nUQTyOp::rest) =
{AlphaT s | T} ∪ {SymbolT s | T}
Proof
simp[Once firstSet_NT, cmlG_applied, cmlG_FDOM] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSet_nTyOp[simp]:
firstSet cmlG (NN nTyOp :: rest) =
{AlphaT s | T} ∪ {SymbolT s | T} ∪ {LongidT s1 s2 | T}
Proof
simp[Once firstSet_NT, cmlG_applied, cmlG_FDOM] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSet_nPTbase[simp]:
firstSet cmlG (NN nPTbase :: rest) =
firstSet cmlG [NN nTyOp] ∪ {LparT} ∪ {TyvarT s | T}
Proof
simp[Once firstSet_NT, cmlG_applied, cmlG_FDOM, SimpLHS] >>
simp[nullable_PTbase] >> dsimp[Once EXTENSION] >> metis_tac[]
QED
Theorem firstSet_nTbaseList[simp]:
firstSet cmlG (NN nTbaseList :: rest) =
firstSet cmlG [NN nPTbase] ∪ firstSet cmlG rest
Proof
simp[Once firstSet_NT, SimpLHS, cmlG_FDOM, cmlG_applied,
nullable_TbaseList] >> simp[]
QED
Theorem firstSet_nTyVarList[simp]:
firstSet cmlG [NT (mkNT nTyVarList)] = { TyvarT s | T }
Proof
simp[firstSetML_eqn] >> simp[firstSetML_def] >>
simp[cmlG_applied, cmlG_FDOM] >> simp[firstSetML_def] >>
simp[cmlG_applied, cmlG_FDOM] >>
dsimp[Once EXTENSION, EQ_IMP_THM] >>
simp[firstSetML_def]
QED
val _ =
firstSetML_def |> CONJUNCTS |> (fn l => List.take(l,2)) |> rewrites
|> (fn ss => augment_srw_ss [ss])
Theorem firstSet_nLetDec[simp]:
firstSet cmlG [NT (mkNT nLetDec)] = {ValT; FunT}
Proof
simp[firstSetML_eqn, Once firstSetML_def, cmlG_FDOM,
cmlG_applied, INSERT_UNION_EQ]
QED
Theorem firstSet_nLetDecs[simp]:
firstSet cmlG [NT (mkNT nLetDecs)] = {ValT; FunT; SemicolonT}
Proof
simp[firstSetML_eqn, Once firstSetML_def, cmlG_FDOM,
cmlG_applied] >>
simp[Once firstSetML_def, cmlG_FDOM, cmlG_applied, INSERT_UNION_EQ]
QED
Theorem firstSet_nTypeDec[simp]:
firstSet cmlG [NT (mkNT nTypeDec)] = {DatatypeT}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied]
QED
Theorem firstSet_nTypeAbbrevDec[simp]:
firstSet cmlG [NT (mkNT nTypeAbbrevDec)] = {TypeT}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied]
QED
Theorem firstSet_nStructure[simp]:
firstSet cmlG [NT (mkNT nStructure)] = {StructureT}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied]
QED
Theorem firstSet_nDecl[simp]:
firstSet cmlG [NT (mkNT nDecl)] =
{ValT; FunT; DatatypeT;ExceptionT;TypeT;LocalT;StructureT}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied,
INSERT_UNION_EQ]
QED
Theorem firstSet_nDecls[simp]:
firstSet cmlG [NN nDecls] =
{ValT; DatatypeT; FunT; SemicolonT; ExceptionT; TypeT; LocalT;StructureT}
Proof
simp[firstSetML_eqn, Once firstSetML_def, cmlG_applied, cmlG_FDOM] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM] >>
ONCE_REWRITE_TAC [firstSetML_def] >>
simp[cmlG_applied, cmlG_FDOM, INSERT_UNION_EQ, INSERT_COMM]
QED
Theorem IMAGE_GSPEC1[local]:
IMAGE f (GSPEC (λa. (g a, P a))) = GSPEC (λa. (f (g a), P a))
Proof
simp[EXTENSION, PULL_EXISTS]
QED
Theorem BIGUNION_singletons[local,simp]:
BIGUNION (GSPEC (λa. {f a}, P a)) = GSPEC (λa. f a, P a)
Proof
simp[Once EXTENSION, PULL_EXISTS]
QED
Theorem firstSet_nMultOps[simp]:
firstSet cmlG (NT (mkNT nMultOps)::rest) =
{AlphaT "div"; AlphaT"mod"; StarT} ∪ {SymbolT s | validMultSym s}
Proof
simp[firstSetML_eqn, Once firstSetML_def, cmlG_FDOM, cmlG_applied,
INSERT_UNION_EQ, IMAGE_GSPEC1]
QED
Theorem firstSet_nRelOps[simp]:
firstSet cmlG (NT (mkNT nRelOps)::rest) =
EqualsT INSERT {SymbolT s | validRelSym s}
Proof
simp[firstSetML_eqn, Once firstSetML_def, cmlG_applied, cmlG_FDOM,
IMAGE_GSPEC1] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSet_nAddOps[simp]:
firstSet cmlG (NT (mkNT nAddOps)::rest) = {SymbolT s | validAddSym s}
Proof
simp[firstSetML_eqn, Once firstSetML_def, cmlG_applied, cmlG_FDOM,
INSERT_UNION_EQ, IMAGE_GSPEC1]
QED
Theorem firstSet_nCompOps[simp]:
firstSet cmlG (NT (mkNT nCompOps)::rest) = {AlphaT "o"; SymbolT ":="}
Proof
simp[firstSetML_eqn, Once firstSetML_def, cmlG_FDOM, cmlG_applied,
INSERT_UNION_EQ]
QED
Theorem firstSet_nListOps[simp]:
firstSet cmlG (NT (mkNT nListOps)::rest) = {SymbolT s | validListSym s}
Proof
simp[firstSetML_eqn, Once firstSetML_def, cmlG_FDOM, cmlG_applied,
INSERT_UNION_EQ, INSERT_COMM, IMAGE_GSPEC1]
QED
Theorem firstSet_nSpecLine[simp]:
firstSet cmlG [NT (mkNT nSpecLine)] =
{ValT; DatatypeT; TypeT; ExceptionT}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied, INSERT_UNION_EQ, INSERT_COMM]
QED
Theorem firstSet_nSpecLineList[simp]:
firstSet cmlG [NT (mkNT nSpecLineList)] =
{ValT; DatatypeT; TypeT; SemicolonT; ExceptionT}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied] >>
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied,
INSERT_UNION_EQ, INSERT_COMM]
QED
Theorem firstSet_nV:
firstSet cmlG (NN nV:: rest) =
{ AlphaT s | s ≠ "" ∧ ¬isUpper (HD s) ∧ s ≠ "before" ∧ s ≠ "div" ∧
s ≠ "mod" ∧ s ≠ "o"} ∪
{ SymbolT s | validPrefixSym s }
Proof
simp[Once firstSet_NT, cmlG_applied, cmlG_FDOM, IMAGE_GSPEC1] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSet_nFQV:
firstSet cmlG [NT (mkNT nFQV)] =
firstSet cmlG [NT (mkNT nV)] ∪
{ LongidT m i | (m,i) | i ≠ "" ∧ (isAlpha (HD i) ⇒ ¬isUpper (HD i))}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied] >>
dsimp[Once EXTENSION]
QED
Theorem firstSet_nUQConstructorName:
firstSet cmlG (NN nUQConstructorName :: rest) =
{ AlphaT s | s ≠ "" ∧ isUpper (HD s) }
Proof
simp[Once firstSet_NT, cmlG_applied, cmlG_FDOM] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSet_nConstructorName:
firstSet cmlG (NN nConstructorName :: rest) =
{ LongidT str s | (str,s) | s ≠ "" ∧ isAlpha (HD s) ∧ isUpper (HD s)} ∪
{ AlphaT s | s ≠ "" ∧ isUpper (HD s) }
Proof
ntac 2 (simp [Once firstSet_NT, cmlG_applied, cmlG_FDOM]) >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSetML_nConstructorName[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ⇒
(firstSetML cmlG sn (NN nConstructorName::rest) =
firstSet cmlG [NN nConstructorName])
Proof
simp[firstSetML_eqn] >>
ntac 2 (simp[firstSetML_def] >> simp[cmlG_applied, cmlG_FDOM]) >>
strip_tac >> simp[Once EXTENSION, EQ_IMP_THM] >> dsimp[firstSetML_def]
QED
Theorem firstSetML_nV[simp]:
mkNT nV ∉ sn ⇒
(firstSetML cmlG sn (NN nV::rest) = firstSet cmlG [NN nV])
Proof
simp[firstSetML_eqn] >> simp[firstSetML_def] >>
simp[cmlG_FDOM, cmlG_applied] >> strip_tac >>
simp[Once EXTENSION, EQ_IMP_THM] >> dsimp[]
QED
Theorem firstSetML_nFQV[simp]:
mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ⇒
(firstSetML cmlG sn (NN nFQV::rest) = firstSet cmlG [NN nFQV])
Proof
simp[firstSetML_eqn] >>
ntac 2 (simp[firstSetML_def] >> simp[cmlG_FDOM, cmlG_applied]) >>
strip_tac >> simp[Once EXTENSION, EQ_IMP_THM] >> dsimp[]
QED
Theorem firstSet_nEtuple[simp]:
firstSet cmlG [NT (mkNT nEtuple)] = {LparT}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied]
QED
Theorem firstSet_nEliteral[simp]:
firstSet cmlG [NT (mkNT nEliteral)] =
{IntT i | T} ∪ {StringT s | T} ∪ {CharT c | T} ∪ {WordT w | T} ∪
{FFIT s | T}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied] >>
dsimp[Once EXTENSION] >> gen_tac >> eq_tac >> rw[]
QED
Theorem firstSetML_nEliteral[simp]:
mkNT nEliteral ∉ sn ⇒
firstSetML cmlG sn (NT (mkNT nEliteral)::rest) =
firstSet cmlG [NT (mkNT nEliteral)]
Proof
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM] >>
dsimp[Once EXTENSION] >> metis_tac[]
QED
Theorem firstSet_nEbase[simp]:
firstSet cmlG [NT (mkNT nEbase)] =
{LetT; LparT; LbrackT; OpT} ∪ firstSet cmlG [NT (mkNT nFQV)] ∪
firstSet cmlG [NT (mkNT nEliteral)] ∪
firstSet cmlG [NT (mkNT nConstructorName)]
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied] >>
dsimp[Once EXTENSION] >> gen_tac >> eq_tac >> rw[] >> simp[]
QED
Theorem firstSetML_nEbase[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEliteral ∉ sn ⇒
firstSetML cmlG sn (NT (mkNT nEbase)::rest) =
firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM] >> strip_tac >>
Cases_on `mkNT nEtuple ∈ sn` >>
simp[Once firstSetML_def, cmlG_FDOM, cmlG_applied] >>
simp[Once EXTENSION, EQ_IMP_THM] >> dsimp[]
QED
Theorem firstSet_nEapp[simp]:
firstSet cmlG [NT (mkNT nEapp)] = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[Once firstSetML_eqn, SimpLHS] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM]) >>
simp[Once EXTENSION, EQ_IMP_THM] >> dsimp[]
QED
Theorem firstSetML_nEapp[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEliteral ∉ sn
⇒
firstSetML cmlG sn (NT (mkNT nEapp) :: rest) =
firstSet cmlG [NT(mkNT nEbase)]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM]) >>
simp[Once EXTENSION, EQ_IMP_THM] >> dsimp[]
QED
Theorem firstSet_nEmult[simp]:
firstSet cmlG [NT (mkNT nEmult)] = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nEmult[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEliteral ∉ sn
⇒
firstSetML cmlG sn (NT (mkNT nEmult) :: rest) =
firstSet cmlG [NT (mkNT nEbase)]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nEadd[simp]:
firstSet cmlG [NT (mkNT nEadd)] = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nEadd[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nEliteral ∉ sn⇒
firstSetML cmlG sn (NT (mkNT nEadd) :: rest) =
firstSet cmlG [NT(mkNT nEbase)]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nElistop[simp]:
firstSet cmlG (NT (mkNT nElistop)::rest) =
firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nElistop[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nElistop ∉ sn ∧
mkNT nEliteral ∉ sn
⇒
firstSetML cmlG sn (NT (mkNT nElistop) :: rest) =
firstSet cmlG [NT(mkNT nEbase)]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nErel[simp]:
firstSet cmlG (NT(mkNT nErel)::rest) = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nErel[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nErel ∉ sn ∧ mkNT nElistop ∉ sn ∧
mkNT nEliteral ∉ sn
⇒
firstSetML cmlG sn (NT (mkNT nErel) :: rest) = firstSet cmlG [NN nEbase]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nEcomp[simp]:
firstSet cmlG (NT(mkNT nEcomp)::rest) = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nEcomp[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nErel ∉ sn ∧ mkNT nEcomp ∉ sn ∧
mkNT nElistop ∉ sn ∧ mkNT nEliteral ∉ sn ⇒
firstSetML cmlG sn (NT (mkNT nEcomp) :: rest) = firstSet cmlG [NN nEbase]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nEbefore[simp]:
firstSet cmlG (NT(mkNT nEbefore)::rest) =
firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nEbefore[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nErel ∉ sn ∧ mkNT nEcomp ∉ sn ∧
mkNT nEbefore ∉ sn ∧ mkNT nElistop ∉ sn ∧ mkNT nEliteral ∉ sn ⇒
firstSetML cmlG sn (NT (mkNT nEbefore)::rest) = firstSet cmlG [NN nEbase]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nEtyped[simp]:
firstSet cmlG (NT(mkNT nEtyped)::rest) = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nEtyped[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nErel ∉ sn ∧ mkNT nEcomp ∉ sn ∧
mkNT nEbefore ∉ sn ∧ mkNT nEtyped ∉ sn ∧ mkNT nElistop ∉ sn ∧
mkNT nEliteral ∉ sn
⇒
firstSetML cmlG sn (NT (mkNT nEtyped)::rest) = firstSet cmlG [NN nEbase]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nElogicAND[simp]:
firstSet cmlG (NT(mkNT nElogicAND)::rest) = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nElogicAND[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nErel ∉ sn ∧ mkNT nEcomp ∉ sn ∧
mkNT nEbefore ∉ sn ∧ mkNT nEtyped ∉ sn ∧ mkNT nElogicAND ∉ sn ∧
mkNT nElistop ∉ sn ∧ mkNT nEliteral ∉ sn
⇒
firstSetML cmlG sn (NT (mkNT nElogicAND)::rest) =
firstSet cmlG [NN nEbase]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nElogicOR[simp]:
firstSet cmlG (NT(mkNT nElogicOR)::rest) = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nElogicOR[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nErel ∉ sn ∧ mkNT nEcomp ∉ sn ∧
mkNT nEbefore ∉ sn ∧ mkNT nEtyped ∉ sn ∧ mkNT nElogicAND ∉ sn ∧
mkNT nElogicOR ∉ sn ∧ mkNT nElistop ∉ sn ∧ mkNT nEliteral ∉ sn
⇒
firstSetML cmlG sn (NT (mkNT nElogicOR)::rest) =
firstSet cmlG [NN nEbase]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nEhandle[simp]:
firstSet cmlG (NT(mkNT nEhandle)::rest) = firstSet cmlG [NT (mkNT nEbase)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSetML_nEhandle[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nErel ∉ sn ∧ mkNT nEcomp ∉ sn ∧
mkNT nEbefore ∉ sn ∧ mkNT nEtyped ∉ sn ∧ mkNT nElogicAND ∉ sn ∧
mkNT nElogicOR ∉ sn ∧ mkNT nEhandle ∉ sn ∧ mkNT nElistop ∉ sn ∧
mkNT nEliteral ∉ sn
⇒
firstSetML cmlG sn (NT (mkNT nEhandle)::rest) =
firstSet cmlG [NN nEbase]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM])
QED
Theorem firstSet_nE:
firstSet cmlG (NT(mkNT nE)::rest) =
firstSet cmlG [NT (mkNT nEbase)] ∪ {IfT; CaseT; FnT; RaiseT}
Proof
simp[SimpLHS, firstSetML_eqn] >>
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM]) >>
simp[Once EXTENSION, EQ_IMP_THM] >> dsimp[]
QED
Theorem firstSet_nTopLevelDecs[simp]:
firstSet cmlG [NN nTopLevelDecs] =
{ValT; FunT; SemicolonT; DatatypeT; StructureT; ExceptionT; TypeT;
LocalT} ∪
firstSet cmlG [NT (mkNT nE)]
Proof
simp[Once firstSet_NT, cmlG_applied, cmlG_FDOM] >>
ONCE_REWRITE_TAC [firstSet_NT] >> simp[cmlG_applied, cmlG_FDOM] >>
simp[INSERT_UNION_EQ, INSERT_COMM] >>
simp[EXTENSION, EQ_IMP_THM] >> rpt strip_tac >> rveq >> simp[]
QED
Theorem firstSet_nNonETopLevelDecs[simp]:
firstSet cmlG [NN nNonETopLevelDecs] =
{ValT; FunT; SemicolonT; DatatypeT; StructureT; ExceptionT; TypeT;
LocalT}
Proof
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied] >>
simp[Once firstSet_NT, cmlG_FDOM, cmlG_applied] >>
simp[INSERT_COMM, INSERT_UNION_EQ]
QED
Theorem firstSet_nEseq[simp]:
firstSet cmlG (NN nEseq :: rest) = firstSet cmlG [NN nE]
Proof
simp[SimpLHS, Once firstSet_NT, cmlG_FDOM, cmlG_applied] >>
simp[firstSet_nE]
QED
Theorem NOTIN_firstSet_nE[simp]:
ValT ∉ firstSet cmlG (NT (mkNT nE) :: rest) ∧
StructureT ∉ firstSet cmlG (NT (mkNT nE) :: rest) ∧
FunT ∉ firstSet cmlG (NT (mkNT nE) :: rest) ∧
DatatypeT ∉ firstSet cmlG (NT (mkNT nE) :: rest) ∧
ExceptionT ∉ firstSet cmlG (NT (mkNT nE) :: rest) ∧
SemicolonT ∉ firstSet cmlG (NT (mkNT nE) :: rest) ∧
RparT ∉ firstSet cmlG (NN nE :: rest) ∧
RbrackT ∉ firstSet cmlG (NN nE :: rest) ∧
TypeT ∉ firstSet cmlG (NN nE :: rest)
Proof
simp[firstSet_nE, firstSet_nFQV] >>
rpt (dsimp[Once firstSet_NT, cmlG_FDOM, cmlG_applied, disjImpI])
QED
Theorem firstSetML_nE[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nUQConstructorName ∉ sn ∧
mkNT nEbase ∉ sn ∧ mkNT nFQV ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nEapp ∉ sn ∧
mkNT nEmult ∉ sn ∧ mkNT nEadd ∉ sn ∧ mkNT nErel ∉ sn ∧ mkNT nEcomp ∉ sn ∧
mkNT nEbefore ∉ sn ∧ mkNT nEtyped ∉ sn ∧ mkNT nElogicAND ∉ sn ∧
mkNT nElogicOR ∉ sn ∧ mkNT nEhandle ∉ sn ∧ mkNT nE ∉ sn ∧
mkNT nElistop ∉ sn ∧ mkNT nEliteral ∉ sn ⇒
firstSetML cmlG sn (NT (mkNT nE)::rest) = firstSet cmlG [NN nE]
Proof
ntac 2 (simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM, firstSet_nE]) >>
simp[Once EXTENSION, EQ_IMP_THM] >> dsimp[]
QED
Theorem firstSet_nElist1[simp]:
firstSet cmlG (NT (mkNT nElist1)::rest) = firstSet cmlG [NT (mkNT nE)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM]
QED
Theorem firstSet_nElist2[simp]:
firstSet cmlG (NT (mkNT nElist2)::rest) = firstSet cmlG [NT (mkNT nE)]
Proof
simp[SimpLHS, firstSetML_eqn] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM]
QED
Theorem firstSetML_nPtuple[simp]:
mkNT nPtuple ∉ sn ⇒ (firstSetML cmlG sn (NN nPtuple :: rest) = {LparT})
Proof
simp[Once firstSetML_def, cmlG_FDOM, cmlG_applied]
QED
Theorem firstSet_nPtuple[simp]:
firstSet cmlG (NN nPtuple :: rest) = {LparT}
Proof
simp[firstSetML_eqn, firstSetML_nPtuple]
QED
Theorem firstSet_nPbase[simp]:
firstSet cmlG (NN nPbase :: rest) =
{LparT; UnderbarT; LbrackT; OpT} ∪ {IntT i | T } ∪ {StringT s | T } ∪
{CharT c | T } ∪
firstSet cmlG [NN nConstructorName] ∪ firstSet cmlG [NN nV]
Proof
simp[SimpLHS, firstSetML_eqn] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSetML_nPbase[simp]:
mkNT nPbase ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nConstructorName ∉ sn ∧
mkNT nUQConstructorName ∉ sn ∧ mkNT nPtuple ∉ sn ⇒
firstSetML cmlG sn (NN nPbase :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[Once firstSetML_def, cmlG_FDOM, cmlG_applied] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSet_nPConApp[simp]:
firstSet cmlG (NN nPConApp :: rest) =
firstSet cmlG [NN nConstructorName]
Proof
simp[SimpLHS, firstSetML_eqn] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM] >>
simp[Once firstSetML_def]
QED
Theorem firstSetML_nPConApp[simp]:
mkNT nConstructorName ∉ sn ∧ mkNT nPConApp ∉ sn ∧
mkNT nUQConstructorName ∉ sn ⇒
firstSetML cmlG sn (NN nPConApp :: rest) =
firstSet cmlG [NN nConstructorName]
Proof
simp[Once firstSetML_def, cmlG_FDOM, cmlG_applied] >>
simp[Once firstSetML_def]
QED
Theorem firstSet_nPapp[simp]:
firstSet cmlG (NN nPapp :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[SimpLHS, firstSetML_eqn] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSetML_nPapp[simp]:
mkNT nPbase ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nConstructorName ∉ sn ∧
mkNT nUQConstructorName ∉ sn ∧ mkNT nPtuple ∉ sn ∧ mkNT nPapp ∉ sn ∧
mkNT nPConApp ∉ sn ⇒
firstSetML cmlG sn (NN nPapp :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[Once firstSetML_def, cmlG_FDOM, cmlG_applied] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSet_nPcons[simp]:
firstSet cmlG (NN nPcons :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[SimpLHS, firstSetML_eqn] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM]
QED
Theorem firstSetML_nPcons[simp]:
mkNT nPbase ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nConstructorName ∉ sn ∧
mkNT nUQConstructorName ∉ sn ∧ mkNT nPtuple ∉ sn ∧ mkNT nPapp ∉ sn ∧
mkNT nPcons ∉ sn ∧ mkNT nPConApp ∉ sn ⇒
firstSetML cmlG sn (NN nPcons :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[Once firstSetML_def, cmlG_FDOM, cmlG_applied]
QED
Theorem firstSet_nPas[simp]:
firstSet cmlG (NN nPas :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[SimpLHS, firstSetML_eqn] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM] >>
rw [EXTENSION, EQ_IMP_THM] >> gs []
QED
Theorem firstSetML_nPas[simp]:
mkNT nPbase ∉ sn ∧ mkNT nV ∉ sn ∧ mkNT nConstructorName ∉ sn ∧
mkNT nUQConstructorName ∉ sn ∧ mkNT nPtuple ∉ sn ∧ mkNT nPapp ∉ sn ∧
mkNT nPcons ∉ sn ∧ mkNT nPConApp ∉ sn ∧ mkNT nPas ∉ sn ⇒
firstSetML cmlG sn (NN nPas :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[Once firstSetML_def, cmlG_FDOM, cmlG_applied] >>
rw [EXTENSION, EQ_IMP_THM] >> gs []
QED
Theorem firstSet_nPattern[simp]:
firstSet cmlG (NN nPattern :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[SimpLHS, firstSetML_eqn] >>
simp[Once firstSetML_def, cmlG_applied, cmlG_FDOM] >>
dsimp[Once EXTENSION, EQ_IMP_THM]
QED
Theorem firstSet_nPatternList[simp]:
firstSet cmlG (NN nPatternList :: rest) = firstSet cmlG [NN nPattern]
Proof
simp[SimpLHS, Once firstSet_NT, cmlG_FDOM, cmlG_applied] >> simp[]
QED
Theorem firstSet_nPbaseList1[simp]:
firstSet cmlG (NN nPbaseList1 :: rest) = firstSet cmlG [NN nPbase]
Proof
simp[SimpLHS, Once firstSet_NT, cmlG_FDOM, cmlG_applied] >> simp[]
QED
Theorem firstSet_nPEsfx[simp]:
firstSet cmlG (NN nPEsfx :: rest) =
BarT INSERT HandleT INSERT firstSet cmlG rest
Proof
simp[SimpLHS, Once firstSet_NT, cmlG_FDOM, cmlG_applied,
nullable_PEsfx] >> SET_TAC[]
QED
Theorem NOTIN_firstSet_nV[simp]:
CommaT ∉ firstSet cmlG [NN nV] ∧ LparT ∉ firstSet cmlG [NN nV] ∧
RparT ∉ firstSet cmlG [NN nV] ∧ UnderbarT ∉ firstSet cmlG [NN nV] ∧
BarT ∉ firstSet cmlG [NN nV] ∧ OpT ∉ firstSet cmlG [NN nV] ∧
FnT ∉ firstSet cmlG [NN nV] ∧ IfT ∉ firstSet cmlG [NN nV] ∧
EqualsT ∉ firstSet cmlG [NN nV] ∧ DarrowT ∉ firstSet cmlG [NN nV] ∧
ValT ∉ firstSet cmlG [NN nV] ∧
ExceptionT ∉ firstSet cmlG [NN nV] ∧
EndT ∉ firstSet cmlG [NN nV] ∧
AndT ∉ firstSet cmlG [NN nV] ∧
FFIT s ∉ firstSet cmlG [NN nV] ∧
FunT ∉ firstSet cmlG [NN nV] ∧
LbrackT ∉ firstSet cmlG [NN nV] ∧
LocalT ∉ firstSet cmlG [NN nV] ∧
RbrackT ∉ firstSet cmlG [NN nV] ∧
InT ∉ firstSet cmlG [NN nV] ∧
IntT i ∉ firstSet cmlG [NN nV] ∧
StringT s ∉ firstSet cmlG [NN nV] ∧
CharT c ∉ firstSet cmlG [NN nV] ∧
ThenT ∉ firstSet cmlG [NN nV] ∧
ElseT ∉ firstSet cmlG [NN nV] ∧
CaseT ∉ firstSet cmlG [NN nV] ∧
LetT ∉ firstSet cmlG [NN nV] ∧
OfT ∉ firstSet cmlG [NN nV] ∧
RaiseT ∉ firstSet cmlG [NN nV] ∧
DatatypeT ∉ firstSet cmlG [NN nV] ∧
TypeT ∉ firstSet cmlG [NN nV] ∧
SemicolonT ∉ firstSet cmlG [NN nV] ∧ ColonT ∉ firstSet cmlG [NN nV] ∧
StructureT ∉ firstSet cmlG [NN nV] ∧ WordT w ∉ firstSet cmlG [NN nV] ∧
SymbolT "::" ∉ firstSet cmlG [NN nV] ∧
HandleT ∉ firstSet cmlG [NN nV]
Proof
simp[firstSet_nV] >> simp[validPrefixSym_def]
QED
Theorem NOTIN_firstSet_nFQV[simp]:
AndT ∉ firstSet cmlG [NN nFQV] ∧
BarT ∉ firstSet cmlG [NN nFQV] ∧
CaseT ∉ firstSet cmlG [NN nFQV] ∧
CharT c ∉ firstSet cmlG [NN nFQV] ∧
ColonT ∉ firstSet cmlG [NN nFQV] ∧
CommaT ∉ firstSet cmlG [NN nFQV] ∧
DarrowT ∉ firstSet cmlG [NN nFQV] ∧
DatatypeT ∉ firstSet cmlG [NN nFQV] ∧
ElseT ∉ firstSet cmlG [NN nFQV] ∧
EndT ∉ firstSet cmlG [NN nFQV] ∧
EqualsT ∉ firstSet cmlG [NN nFQV] ∧
ExceptionT ∉ firstSet cmlG [NN nFQV] ∧
FFIT s ∉ firstSet cmlG [NN nFQV] ∧
FnT ∉ firstSet cmlG [NN nFQV] ∧
FunT ∉ firstSet cmlG [NN nFQV] ∧
IfT ∉ firstSet cmlG [NN nFQV] ∧
InT ∉ firstSet cmlG [NN nFQV] ∧
IntT i ∉ firstSet cmlG [NN nFQV] ∧
LbrackT ∉ firstSet cmlG [NN nFQV] ∧
LetT ∉ firstSet cmlG [NN nFQV] ∧
LocalT ∉ firstSet cmlG [NN nFQV] ∧
LparT ∉ firstSet cmlG [NN nFQV] ∧
OfT ∉ firstSet cmlG [NN nFQV] ∧
OpT ∉ firstSet cmlG [NN nFQV] ∧
RaiseT ∉ firstSet cmlG [NN nFQV] ∧
RbrackT ∉ firstSet cmlG [NN nFQV] ∧
RparT ∉ firstSet cmlG [NN nFQV] ∧
SemicolonT ∉ firstSet cmlG [NN nFQV] ∧
StringT s ∉ firstSet cmlG [NN nFQV] ∧
StructureT ∉ firstSet cmlG [NN nFQV] ∧
ThenT ∉ firstSet cmlG [NN nFQV] ∧
TypeT ∉ firstSet cmlG [NN nFQV] ∧
UnderbarT ∉ firstSet cmlG [NN nFQV] ∧
ValT ∉ firstSet cmlG [NN nFQV] ∧
WordT w ∉ firstSet cmlG [NN nFQV] ∧
HandleT ∉ firstSet cmlG [NN nV]
Proof
simp[firstSet_nFQV]
QED
Theorem NOTIN_firstSet_nConstructorName[simp]:
AndT ∉ firstSet cmlG [NN nConstructorName] ∧
BarT ∉ firstSet cmlG [NN nConstructorName] ∧
ColonT ∉ firstSet cmlG [NN nConstructorName] ∧
CaseT ∉ firstSet cmlG [NN nConstructorName] ∧
CharT c ∉ firstSet cmlG [NN nConstructorName] ∧
CommaT ∉ firstSet cmlG [NN nConstructorName] ∧
DarrowT ∉ firstSet cmlG [NN nConstructorName] ∧
DatatypeT ∉ firstSet cmlG [NN nConstructorName] ∧
ElseT ∉ firstSet cmlG [NN nConstructorName] ∧
EndT ∉ firstSet cmlG [NN nConstructorName] ∧
EqualsT ∉ firstSet cmlG [NN nConstructorName] ∧
ExceptionT ∉ firstSet cmlG [NN nConstructorName] ∧
FFIT s ∉ firstSet cmlG [NN nConstructorName] ∧
FnT ∉ firstSet cmlG [NN nConstructorName] ∧
FunT ∉ firstSet cmlG [NN nConstructorName] ∧
IfT ∉ firstSet cmlG [NN nConstructorName] ∧
InT ∉ firstSet cmlG [NN nConstructorName] ∧
IntT i ∉ firstSet cmlG [NN nConstructorName] ∧
LbrackT ∉ firstSet cmlG [NN nConstructorName] ∧
LetT ∉ firstSet cmlG [NN nConstructorName] ∧
LocalT ∉ firstSet cmlG [NN nConstructorName] ∧
LparT ∉ firstSet cmlG [NN nConstructorName] ∧
OfT ∉ firstSet cmlG [NN nConstructorName] ∧
OpT ∉ firstSet cmlG [NN nConstructorName] ∧
RaiseT ∉ firstSet cmlG [NN nConstructorName] ∧
RbrackT ∉ firstSet cmlG [NN nConstructorName] ∧
RparT ∉ firstSet cmlG [NN nConstructorName] ∧
SemicolonT ∉ firstSet cmlG [NN nConstructorName] ∧
StringT s ∉ firstSet cmlG [NN nConstructorName] ∧
StructureT ∉ firstSet cmlG [NN nConstructorName] ∧
SymbolT "::" ∉ firstSet cmlG [NN nConstructorName] ∧
SymbolT "ref" ∉ firstSet cmlG [NN nConstructorName] ∧
ThenT ∉ firstSet cmlG [NN nConstructorName] ∧
TypeT ∉ firstSet cmlG [NN nConstructorName] ∧
UnderbarT ∉ firstSet cmlG [NN nConstructorName] ∧
ValT ∉ firstSet cmlG [NN nConstructorName] ∧
WordT w ∉ firstSet cmlG [NN nConstructorName]
Proof
simp[firstSet_nConstructorName]
QED
Theorem firstSets_nV_nConstructorName:
¬(t ∈ firstSet cmlG [NN nConstructorName] ∧ t ∈ firstSet cmlG [NN nV])
Proof
Cases_on `t ∈ firstSet cmlG [NN nV]` >> simp[] >>
fs[firstSet_nV, firstSet_nConstructorName]
QED
val _ = export_theory();