Question: Potentially useful information Quantification over a list Quantification over the elements of a list is defined inductively: Given the environment: Type Ty xs : list
Potentially useful information
Quantification over a list
Quantification over the elements of a list is defined inductively:
Given the environment:
Type Ty
xs : listTy
p: Ty B
Universal quantification over a list is defined as: x in xs px : else F
if emptyxs then
T
pfrontxsx in popxs px
Existential quantification over a list is defined as:
x in xs px :
if emptyxs then
else pfrontxsx in popxs px
Q Proof of Deletion marks
The function del below deletes all occurrences of an element from a list.
delx: Ty xs: listTy: listTy :
if emptyxs then
else
val fr frontxs
if xfr then
delx popxs
else
pushfr delx popxs
Q a Proof marks
Prove that del satisfies the theorem below:
xs: listTy
Vx: Ty
y in delx xs y x
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
