There is a Russian saying, “You can’t take a word out of a song.” Taking it as a hypothesis, prove the theorem, “You can’t add a word to a song.”

Hint: Translate these statements into logic first. What proof technique works best here?

You can use functions:

Add(s,w) which returns lyrics s' that you get by adding a word w to song s

Remove(s,w) which returns lyrics s'' that you get by removing a word w from song s

There are two possible interpretations of the saying: either changing songs lyrics turns it into a different song or the lyrics we get is no longer a song.

If you choose the first interpretation, you can use a function Same (x,y) which returns false when songs x and y are different.

If you choose second interpretation, you can use a function Song(x) which returns false if x is not a song.

In both cases your domain are all possible lyrics, but in the first cases they are all songs and in the second case only some of them are songs.

Respuesta :

ACCESS MORE