Study in Genesis using Prolog

Do you know that the flood came in the year 1656, the year when the last of the patriachs, Methuselah, died?

The following piece of code tells me that:

born(adam,0).
/*born(X,Year):-
begot_age(adam,Year,X).*/
born(X,Year):-
begot_age(Y,Y1,X),
born(Y,Y2),
Year is Y1+Y2.
die(X,Year):-
born(X,Y1),
die_age(X,Y2),
Year is Y1+Y2.
alive(X,Year):-
born(X,Y1),
die(X,Y2),
Year < Y2,
Year > Y1.
contemporary(X,Y):-
born(X,Y1),
born(Y,Y2),
die(X,Y3),
die(Y,Y4),
Y3 > Y2,
Y4 > Y1.

begot_age(adam,130,seth).
begot_age(seth,105,enosh).
begot_age(enosh,90,kenan).
begot_age(kenan,70,mahalalel).
begot_age(mahalalel,65,jared).
begot_age(jared,162,enoch).
begot_age(enoch,65,methuselah).
begot_age(methuselah,187,lamech).
begot_age(lamech,182,noah).
begot_age(noah,500,shem).
begot_age(noah,500,ham).
begot_age(noah,500,japtheh).

die_age(adam,930).
die_age(seth,912).
die_age(enosh,905).
die_age(kenan,910).
die_age(mahalalel,895).
die_age(jared,962).
die_age(enoch,365).
die_age(methuselah,969).
die_age(lamech,777).
die_age(noah,950).
flood(noah,600).
flood_year(Y):-
flood(noah,X),
born(noah,Y1),
Y is X+Y1.

Tags: ,

165 Responses to “Study in Genesis using Prolog”

  1. CHARLES says:

    food allergy and adenoids

    Buy_without prescription…

  2. donald says:

    anger@bwrit5.garden” rel=”nofollow”>.

    сэнкс за инфу :shock:

  3. nicholas says:

    :twisted:

    спасибо за инфу :razz:

  4. robert says:

    :x

    спасибо за инфу :cool:

  5. willard says:

    :neutral:

    спс за инфу :P

  6. joseph says:

    :cool:

    сэнкс за инфу :twisted:

  7. billy says:

    :lol:

    спасибо за инфу :?:

  8. JEREMY says:

    best@medicare.plan.d.for.nexium.40.mg” rel=”nofollow”>..

    Buygeneric meds…

  9. kenneth says:

    :)

    сэнкс за инфу :|

  10. HARRY says:

    infant@prevacid.dose” rel=”nofollow”>.

    Buygeneric drugs…

  11. julia king says:

    short hairstyles

    I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I’m quite certain I’ll learn plenty of new stuff right here! Best of luck for the next!…

Leave a Reply