| 1 |
Set Uniform Inductive Parameters. |
| 2 |
Inductive test (X : Set) : Prop := |
| 3 |
with test2 (X : Set) : X -> Prop := |
| 4 |
| C (x : X) : test2 x. |
| 5 |
|
| 6 |
Require Import TestSuite.list. |
| 7 |
|
| 8 |
Set Suggest Proof Using. |
| 9 |
Set Primitive Projections. |
| 10 |
|
| 11 |
|
| 12 |
Section Grammar. |
| 13 |
Variable A : Type. |
| 14 |
|
| 15 |
Record grammar : Type := Grammar { |
| 16 |
gm_nonterm :> Type ; |
| 17 |
gm_rules :> list (gm_nonterm * list (A + gm_nonterm)) ; |
| 18 |
}. |
| 19 |
|
| 20 |
Set Uniform Inductive Parameters. |
| 21 |
Inductive lang (gm : grammar) : gm -> list A -> Prop := |
| 22 |
| lang_rule S ps ws : In (S, ps) gm -> lmatch ps ws -> lang S (concat ws) |
| 23 |
with lmatch (gm : grammar) : list (A + gm) -> list (list A) -> Prop := |
| 24 |
| lmatch_nil : lmatch nil nil |
| 25 |
| lmatch_consL ps ws a : lmatch ps ws -> lmatch (inl a :: ps) (cons (cons a nil) ws) |
| 26 |
| lmatch_consR ps ws S w : |
| 27 |
lang S w -> lmatch ps ws -> lmatch (inr S :: ps) (w :: ws) |
| 28 |
. |
| 29 |
|
| 30 |
End Grammar. |