Question: Answer the question only with haskell code. Read the book section 2.3 Exercise 4. Theorem proof Assume that the following theorems are true Theorem 1:

Answer the question only with haskell code.

Read the book section 2.3

Exercise 4. Theorem proof

Assume that the following theorems are true

Theorem 1: (length (drop)). Let xs:: [a] be an arbitrary list and n is an integer.

Then length (drop n xs) = length xs - n

Theorem 2: (length (take)). Let xs:: [a] be an arbitrary list and n is an integer.

Then length (take n xs) = n

Using the above theorem, prove Theorem 3

Theorem 2. For arbitrary lists and integer n, prove that length (xs) = length (drop n xs) + length (take n xs)

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 Databases Questions!