Question: # Constructor Theorems on Languages If you have a * goal * that is a language membership, eg , ` In w ( L 1

# Constructor Theorems on Languages
If you have a *goal* that is a language membership,
eg,`In w (L1>> L2)`, then you'll need to use a
constructor theorem, eg,`app_in`
There is one constructor theorem per language:
-`char_in`
-`nil_in`
-`union_in_l`
-`union_in_r`
-`app_in`
**Solve:**[`tutorial1.v`](tutorial1.v)
# Inversion Theorems on Languages
If you have an *assumption* that is a language membership
in one of the assumptions, eg,`In w (L1>> L2)`,
then you'll need to use an inversion theorem, eg,`app_in_inv`.
There is one inversion theorem per language:
- char_in_inv for `"a"`
- app_in_inv for `L1>> L2`
- union_in_inv for `L1 U L2`
- use `inversion H; subst; clear H` for Pow
- use star_to_pow for `L1*`
**Solve:**[`tutorial2.v`](tutorial2.v)
# Exercise 1
*Objective:* If w is in Language, then conclude
something about Language.
The technical point of this exercise is to remember
Inversion Theorems on Languages.
Any equivalence exercises where you show that a language
is equal to "fun w =>..." is a more general case.
For a guiding example, look at l1_spec, in one
of the directions you have that "w is in L1"
and you have to show that "exists w', w = w'++["a"].
## Recommended exercises
- l1_spec
- l4_spec
- abb_not_in_l4
# Exercise 2
*Objective:* Show that a word in in a language.
The language itself is composed of multiple language
combinators. The goal is to use Constructor Theorems.
## Recommended exercises
- l1_spec
- l4_spec
- aabb_in_l4
# Exercise 3
*Objective:* If w is **not** in Language, then
assume that w **is* in the language, and then
reach a contradiction.
Similarly to exercise 1, you'll need Inversion
Theorems on Languages.
In terms of proof technique, you'll always try
to favor (start by) assumptions that lead to
an impossibility. You'll probably need to use
tactics such as inversion (explosion principle),
intuition, and contradiction.
## Recommended exercises
- car_not_in_l4
- abb_not_in_l4
# Exercise 4
*Objective:* show language equivalence through
rewriting rules.
In this case, because both languages consist
of combinators, you'll want to use theorems
for rewriting equalities. These theorems end
with "_rw".
`Search` is your friend.
For instance, `Search (_=={})` searches
for any rewrite rule that ends with the void
language `{}`.
Do **not** open Equiv and do not use `split`.
## Recommended exercises
-`Goal (("a">>{})* U "a")*=="a"*.`
# Exercise 5
Same as 4.
# Exercise 6
**Objective:** language equivalence combines
showing that a word is in a language (Exercise 2),
and concluding something from knowing that a word is
in a language (Exercise 1).
Open **Equiv**. You will want to use the theorems
`app_l_char_in_inv` and `app_l_char_in`
Practice Exercises 1,2, and 3.
# Exercise 7
Same as 4.
# Exercise 8
Same as 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!