**P(x) ↔ ((x>1) Λ (∀y: D(y,x) → (y=1 ∨ y=x)))**

This is my interpretation, is it correct?

**P(x) ↔ ((x>1) Λ (¬∃y: D(y,x) → (¬(y=1) ∧ ¬(y=x))))**

Posted 24 June 2013 - 09:53 AM

This looks like a correct application of de Morgan's law. However, I think there may be a flaw in the implication side.

Let me put it in English and you can see what you think:

X is prime iff x is positive and (if there exists no y which divides x evenly then y is not 1 and y is not x)

Let me put it in English and you can see what you think:

X is prime iff x is positive and (if there exists no y which divides x evenly then y is not 1 and y is not x)

This post has been edited by **jon.kiparsky**: 24 June 2013 - 09:57 AM

Posted 24 June 2013 - 09:54 AM

No. The contrapositive would be valid. So if y != 1 and y != x, then y does not divide x.

You are only inverting the necessary condition, not the sufficient condition, which is only half of the inverse and still incorrect.

Edit- Can you write out your definition in plain English? The mathematical representation of your definition is bulky and hard to work with. I'd be interested in hearing your thoughts more plainly.

Edit again- I would agree with how Jon read this. I'm just not a fan of it because you're mixing up the necessary and sufficient conditions.

You are only inverting the necessary condition, not the sufficient condition, which is only half of the inverse and still incorrect.

Edit- Can you write out your definition in plain English? The mathematical representation of your definition is bulky and hard to work with. I'd be interested in hearing your thoughts more plainly.

Quote

This is my interpretation, is it correct?

P(x) ↔ ((x>1) Λ (¬∃y: D(y,x) → (¬(y=1) ∧ ¬(y=x))))

P(x) ↔ ((x>1) Λ (¬∃y: D(y,x) → (¬(y=1) ∧ ¬(y=x))))

Edit again- I would agree with how Jon read this. I'm just not a fan of it because you're mixing up the necessary and sufficient conditions.

Quote

X is prime iff x is positive and (if there exists no y which divides x evenly then y is not 1 and y is not x)

Posted 24 June 2013 - 10:21 AM

So..

**P(x) ↔ ((x>1) Λ (¬∃y: D(y,x) → (¬(y=1) ∧ ¬(y=x))))**

According to me it says, x is a prime number iff x is greater than 1 and there does**NOT** exists a number such that if it divides x then the number does not equal x and 1.

According to me it says, x is a prime number iff x is greater than 1 and there does

This post has been edited by **deprosun**: 24 June 2013 - 10:26 AM

Posted 24 June 2013 - 10:51 AM

Your sufficient condition will never be true though.

Clearly, let y = 1 or y = x. Thus, your implication does not hold.

Again, order of implication matters. If p -> q is a valid implication, then ~q -> ~p is a valid implication as well.

When negating a logical statement, if you have a universal quantifier "for all x, p(x)", the negation is "there exists an x such that ~p(x)." Similarly, an existential quantifier is negated by a universal quantifier. So "if there exists an x such that p(x)," the negation is "for all x, ~p(x)."

Quote

If there does not exist a y that divides x

Clearly, let y = 1 or y = x. Thus, your implication does not hold.

Again, order of implication matters. If p -> q is a valid implication, then ~q -> ~p is a valid implication as well.

When negating a logical statement, if you have a universal quantifier "for all x, p(x)", the negation is "there exists an x such that ~p(x)." Similarly, an existential quantifier is negated by a universal quantifier. So "if there exists an x such that p(x)," the negation is "for all x, ~p(x)."

Posted 24 June 2013 - 11:38 AM

Just another note as well. Make sure you specify your domain of discourse in your definitions. I'm assuming you're talking about the integers. You get some interesting results when you look at complex numbers and primality. In fact, analytic number theory is a pretty well-defined field.

Posted 24 June 2013 - 12:35 PM

I have one more,

**The statement says: A prime number like 7 is relatively prime to any natural number except one of its own multiple.**

On a side note: Relatively Prime is when GCD(x,y)=1.

I wanted to translate the**bolded** statement into predicates as following:

P(x) defines that x is prime

**GCD(P(x),y) == 1 → (∀y: ¬D(x,y))**

Correct?

On a side note: Relatively Prime is when GCD(x,y)=1.

I wanted to translate the

P(x) defines that x is prime

Correct?

Posted 24 June 2013 - 12:41 PM

It's not a universal statement though. And the quantifier should be on the sufficient condition, not the necessary condition. When talking about coprimality, you are talking about two distinct integers (both existential). The only number that is relatively prime to all the naturals is 1.

Posted 24 June 2013 - 12:47 PM

Probably not a lot. You seem to be able to articulate the definitions, but you need work on the flow of logic, as well as necessary vs. sufficient conditions.

Posted 24 June 2013 - 12:50 PM

What class are you in? What textbooks are you using? Those can be good resources sometimes.

Jimmy Arnold's book is used for the proofs class at my school. Martin Day has a textbook as well, though I prefer Arnold's. Both are free.

http://www.math.vt.e...k/3034Chap1.pdf

Jimmy Arnold's book is used for the proofs class at my school. Martin Day has a textbook as well, though I prefer Arnold's. Both are free.

http://www.math.vt.e...k/3034Chap1.pdf

- Caffeine Lounge
- Corner Cubicle
- Student Campus
- Software Development
- Industry News
- Introduce Yourself
- Nightmare.In.Code

- C and C++
- VB.NET
- Java
- C#
- ASP.NET
- .NET Framework
- VB6
- PHP
- Ruby
- Python
- ColdFusion
- Databases
- Other Languages
- Game Development
- Mobile Development
- 52 Weeks Of Code

- Web Development
- HTML & CSS
- JavaScript
- Graphic Design
- Flash & ActionScript
- Blogging
- SEO & Advertising
- Web Servers & Hosting
- Site Check

- C++ Tutorials
- Java Tutorials
- VisualBasic Tutorials
- VB.NET Tutorials
- C# Tutorials
- PHP Tutorials
- ColdFusion Tutorials
- Database Tutorials

- C Snippets
- C++ Snippets
- Java Snippets
- Visual Basic Snippets
- C# Snippets
- VB.NET Snippets
- ASP.NET Snippets
- PHP Snippets
- Python Snippets
- Ruby Snippets
- ColdFusion Snippets
- SQL Snippets
- Assembly Snippets
- Functional Programming Snippets
- Perl Snippets
- HTML/CSS Snippets
- Javascript Snippets
- Flash/ActionScript Snippets
- ASP Snippets
- Linux, Unix, and Bash Snippets
- Other Languages Snippets
- Regex

Copyright 2001-2015 **MediaGroup1 LLC**, All Rights Reserved

A**MediaGroup1 LLC** Production - Version 6.0.2.1.36

Server: secure3

A

Server: secure3