PLG 1 Presentation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

1

ICS 2304

PROGRAMMING PARADIGMS

ASSIGNMENT ONE

NAME REGISTRATION NUMBER

WEKE VICTOR SCT211-0015/2018

MAKENA EURYDICE SCT211-0002/2018

MAYEKU PAUL SCT211-0016/2018

NJENGA MELISSA SCT211-0020/2018


2

As another example we define a relation DIV over the natural numbers but instead of writing

< 𝑥, 𝑦 >∈ 𝐷𝐼𝑉 We simply write 𝑥 𝐷𝐼𝑉𝑦. the defining rules for 𝐷𝐼𝑉 are

𝑛 𝐷𝐼𝑉 𝑘
𝑛 𝐷𝐼𝑉 0 𝑛 𝐷𝐼𝑉 (𝑛+𝑘)

Assignment

1. Explain the rule definition above and explain why we have the first rule.

In this case we are required to prove that x DIV y also considered as our theorem P(x).

In mathematical induction, to prove that P(x) is true for every number, we first prove that

P(x) is true of 0, that is, P (0) (base form). We assume that P(x) is true for P (k)

(induction hypothesis) and prove that P(x) is true for P (k+1) (inductive case). Once we

complete both steps, we have then proved that P(x) is true for every natural number.

Like most proofs, logic proofs usually begin with premises --- statements that you're

allowed to assume. The conclusion is the statement that you need to prove. The idea is to

operate on the premises using rules of inference until you arrive at the conclusion. In the

definition above, n Div 0 is considered similar to P (0). N DIV 0 is an axiom with an

empty set of premises and a conclusion x, while the latter has n DIV k as its set of

premises and n DIV (n+k) as its conclusion. Basically, if premises then conclusion, that
𝑃𝑅𝐸𝑀𝐼𝑆𝐸𝑆
is, 𝐶𝑂𝑁𝐶𝐿𝑈𝑆𝐼𝑂𝑁 . This explains the defining rules above.
3

2. Use an explicit example to demonstrate the above rule definition

𝑘€𝑁
0€𝑁 succ(k) € 𝑁

Key:

N – Natural numbers

succ(k) – Successor of k

The axiom, acts as a base from which further arguments may arise. It states that zero is a

member of the set N (natural numbers).

The rule instance, has both a premise and a conclusion. The premise states that the

element k is a member of the set N followed by a conclusion stating that any successor of

k is also a member of the set N. This takes into consideration that if a premise is true then

the conclusion has to be true.

You might also like