Anyone wants to learn logic?

  • 124 Replies
  • 2752 Views
*

ivan.moony

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1169
    • Some of my projects
Re: Anyone wants to learn logic?
« Reply #60 on: December 13, 2018, 02:30:47 pm »
If also has some deeper insights. For example, "if X is bird then X can fly" can be written as:

Bird(x) -> Fly(x)

Which translates to:

~Bird(x) | Fly(x)

Now, conveniently if we say "Bird(x)", resolution rule automatically asserts "Fly(x)". But also, less obvious, if we say "~Fly(x)", resolution rule asserts "~Bird(x)", which means "if X can't fly, then X is not a bird".
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

8pla.net

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1100
    • 8pla.net
Re: Anyone wants to learn logic?
« Reply #61 on: December 13, 2018, 04:42:45 pm »

learn if there is light then day else night

learn if there is light then it is day else it is night

learn if (there = light) then (it = day) else (it = night)

learn[] = there = light ? it = day : it = night ;

PHP:
$light=rand(0,1);$learn[]=$there=$light?$it="day":$it="night";

The choice is decided at random.  Locate the middle equals operator in the color coded source. Should logic set (=), or compare (==), $there to $light?


My Very Enormous Monster Just Stopped Using Nine

*

ivan.moony

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1169
    • Some of my projects
Re: Anyone wants to learn logic?
« Reply #62 on: December 13, 2018, 04:59:29 pm »
That's a tricky question. In logic, there's no distinction between getters and setters. Refer to documentation about logic for more details.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

8pla.net

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1100
    • 8pla.net
Re: Anyone wants to learn logic?
« Reply #63 on: December 13, 2018, 05:20:11 pm »
Thank you Ivan.

I am starting by converting the simplest logic to source code.
When it works with the simplest logic as source code, then I think
there is a point in building upon that foundation.

Per your request...

Code: [Select]
<script language="JavaScript">
function learn(there) {
  var light=Math.floor(Math.random() * Math.floor(2));
  return (there=light ? "day" : "night");
}
var there;
console.log(learn(there));
</script>

Console log displays "day" or "night" at random.
My Very Enormous Monster Just Stopped Using Nine

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • **************
  • Dot Matrix
  • *
  • 2416
  • First it wiggles, then it is rewarded.
Re: Anyone wants to learn logic?
« Reply #64 on: December 13, 2018, 05:40:04 pm »
Is the material really saying to assign truths to things if its parts are true? Really? How does something's parts being true make the thing they make true?

Edit: ex. "I can eat and sleep."
Emergent

*

ivan.moony

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1169
    • Some of my projects
Re: Anyone wants to learn logic?
« Reply #65 on: December 13, 2018, 05:45:40 pm »
Lock,

Not in all cases. If we have a sequence:

A1 | A2 | A3 | ...

then only one element has to be true for the whole sequence to be true. On the other hand, if we have:

A1 & A2 & a3 & ...

then all the elements have to be true for the whole sequence to be true.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • **************
  • Dot Matrix
  • *
  • 2416
  • First it wiggles, then it is rewarded.
Re: Anyone wants to learn logic?
« Reply #66 on: December 13, 2018, 06:10:20 pm »
Yes, I got that about the OR :p
Including how in some cases only the later has to be true

The following has 2 facts combined (separated by a comma) "My hat on my desk, sucks up dirt.". When you have a sentence made of smaller true parts, how can the sentence be true so long as the smaller parts are true?

We need premises.
Remember the Art Bob Carl example? The conclusion is "Bob murdered Victor.". And it required premises like who said who was in town and knew him etc.
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • **************
  • Dot Matrix
  • *
  • 2416
  • First it wiggles, then it is rewarded.
Re: Anyone wants to learn logic?
« Reply #67 on: December 14, 2018, 12:55:03 pm »
"Rocks sleep."

The atoms of this sentence are true. Rocks is true. Sleep is true.

1 1

But the bigger 'part' they build; "Rocks sleep.", is false, there's countless examples ex. "rocks eat" etc.

Following the Course on their site, it suggest the truth of the sentence "Rocks sleep." is:

1

Because both children are 1.

The sum of them is therefore 1.

Right? This is wrong... How does it / does it solve this?
Emergent

*

ivan.moony

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1169
    • Some of my projects
Re: Anyone wants to learn logic?
« Reply #68 on: December 14, 2018, 01:34:25 pm »
You need predicate logic to express that:

(∀x∊Rocks).Sleep(x)
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • **************
  • Dot Matrix
  • *
  • 2416
  • First it wiggles, then it is rewarded.
Re: Anyone wants to learn logic?
« Reply #69 on: December 14, 2018, 01:39:21 pm »
...Huh? How does that figure out if the part they build is true? Premises? You'd need prehand knowledge to determine if it's true.
Emergent

*

ivan.moony

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1169
    • Some of my projects
Re: Anyone wants to learn logic?
« Reply #70 on: December 14, 2018, 02:12:35 pm »
When you have a whole compound sentence that is true, there are rules that say which parts should be true for the whole sentence to be true. If sentence is composed of only one part [i.e. Sleep(x)] than that part has to be true. Otherwise, the sentence is false.

You may see quantificators as a sentence modifiers that allow variables to range over sets. That is why quantificators itself can't have any truth value assigned - as a parts of a sentence. Only predicates - as a parts of a sentence - can have assigned a truth value.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • **************
  • Dot Matrix
  • *
  • 2416
  • First it wiggles, then it is rewarded.
Re: Anyone wants to learn logic?
« Reply #71 on: December 14, 2018, 04:30:33 pm »
In English, you mean the training data / the premises sets / the base knowledge, is 'marked'/tagged with rank truths, and that to determine one's truth requires modifiers that can validate it and then assign over truth?
Emergent

*

ivan.moony

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1169
    • Some of my projects
Re: Anyone wants to learn logic?
« Reply #72 on: December 14, 2018, 05:26:58 pm »
We may have a set:

car ∊ Vehicles; train ∊ Vehicles; plane ∊ Vehicles


Now, to say:

(∀x∊Vehicles).Rides(x)

it is the same as we write:

Rides(car) ∧ Rides(train) ∧ Rides(plane)


But if we say:

(∃x∊Vehicles).HasWheels(x)

it is the same as we write:

HasWheels(car) ∨ HasWheels(train) ∨ HasWheels(plane)
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • **************
  • Dot Matrix
  • *
  • 2416
  • First it wiggles, then it is rewarded.
Re: Anyone wants to learn logic?
« Reply #73 on: December 15, 2018, 07:02:09 am »
car, train, plane = vehicle
vehicles = rides, has wheels

New unseen input is: "Car has wheels."

How do we find the sentence is true?
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • **************
  • Dot Matrix
  • *
  • 2416
  • First it wiggles, then it is rewarded.
Re: Anyone wants to learn logic?
« Reply #74 on: December 17, 2018, 08:58:12 am »
On chapter 11

(Need some examples using English sentences, for induction.)
P.S don't use the water boils in case1, case2, case3, hence it always boils....no lol...the below clearly is something deeper going on...

Can someone explain in English an example of the below in the real world? Like Art did showing how we eliminate 2 'nots' in "I'm not going to not pick you.".

I see lots of interesting words like "to match   the antecedent of the premise" "implication introduction" "strip away" and so on, show all this in your reply.



"The relationship holds the other way around as well. Given ∀x.(∃y.p(x,y) ⇒ q(x)), we know that ∀x.∀y.(p(x,y) ⇒ q(x)). We can convert an existential quantifier in the antecedent of an implication into a universal quantifier outside the implication."

"Our proof is shown below. As usual, we start with our premise. We start a subproof by making an assumption. Then we turn the assumption into an existential sentence to match the antecedent of the premise. We use Universal Implication to strip away the quantifier in the premise to expose the implication. Then, we apply Implication Elimination to derive q(x). Finally, we use Implication Introduction, and we generalize using two applications of Universal Introduction."
« Last Edit: December 17, 2018, 09:33:01 am by LOCKSUIT »
Emergent

 


Users Online

73 Guests, 2 Users
Users active in past 15 minutes:
ivan.moony, Art
[Global Moderator]
[Trusty Member]

Most Online Today: 122. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)

Articles