Can someone help me understand predicate logic by explaining 2 statements?

74 Views Asked by At

∀n : ((0≤n<19) →(A(n) < A(19))

I want to know what this statement means. I'm new to Logic and I'm starting to understand parts of it (mainly the basics) however I've come up stuck when it comes to this statement. A relates to an array but i can't tell whether the statement is saying there's 19 objects in the array or something else.

Also I'm confused what this statement also means.

∀n : (A(0)=2 ˄ (n>1 → A(n)=2 * (A(n-1))))

2

There are 2 best solutions below

1
On

∀n : ((0≤n<19) →(A(n) < A(19)) means that given any number n between 0 and 19 (including 0, but not including 19) it is true that A(n) < A(19). In other words, any of the entries A(0), A(1), A(2), ... A(18) of the array A are smaller than A(19).

∀n : (A(0)=2 ˄ (n>1 → A(n)=2 * (A(n-1)))) means that the 'first' entry A(0) equals 2, and that all other entries are twice the previous entry ... so A(1)=2, A(2)=4, A(3)=8, etc. .... Or at least I am pretty sure they tried to say that, but by using $n>1$ in the expression they actually don't specify what $A(1)$ is..., so it would merely say that whtever $A(1)$ is, $A(2)$ is twice that, etc. ... By changing this to $n>0$ you get what I just said.

1
On

$\forall n : ((0 \leq n < 19) \rightarrow (A(n) < A(19))$ says that the first nineteen elements of the array are all strictly less than the twentieth element. You read it this way, "Whenever $n$ is a number between 0 (included) and 19 (excluded), $A(n)$ is less than $A(19)$." Nothing is said about the other elements of the array.

$\forall n : (A(0) = 2 \wedge (n > 1 \rightarrow A(n) = 2 \cdot A(n-1)))$ says that $A(0)$ equals $2$, and for $n > 1$ (this is probably a typo: it makes more sense if it is $n > 0$) $A(n)$ is twice $A(n-1)$.

Written this way, these formulae refer to infinite arrays, or if you prefer, functions that map natural numbers to numbers of some kind.