The Task is called the Inhabitation Problem (Was: /* A */ and /* B */ are different)

Liste des GroupesRevenir à s logic 
Sujet : The Task is called the Inhabitation Problem (Was: /* A */ and /* B */ are different)
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : sci.logic
Date : 23. Dec 2024, 00:56:28
Autres entêtes
Message-ID : <vka8vc$17vca$1@solani.org>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.19
Hi,
The Task of Weekend 2 and Weekend 3 is called
the Inhabitation Problem. Its different from
Syntax-directed rule system.
https://en.wikipedia.org/wiki/Type_inhabitation
In the solution to Weekend 2 you see how
Types can be inhabitated by Combinatorial
Expressions. The code is here:
/* vanilla interpreter with typeof/2 counting */
% search(+Goal, +Integer, -Integer)
search(true, N, N).
search((A,B), N, M) :-
    search(A, N, H),
    search(B, H, M).
search(typeof(P, T), N, M) :- N>0, H is N-1,
    clause(typeof(P, T), B),
    search(B, H, M).
search(unify_with_occurs_check(A,B), N, N) :-
    unify_with_occurs_check(A,B).
https://gist.github.com/Jean-Luc-Picard-2021/bc829e6c002b955a51a49ae3bf384c72
It uses a form of iterative deepening,
and finds shortes Combinatorial
Expressions first.
You can apply the same search in Weekend 3,
and find Lambda Expressions instead of
Combinatorial Expressions.
But Weekend 3 should be Natural Deduction
and not Sequent Calculus. You could solve
Sequent Calculus as Weekend 4.
Mild Shock schrieb:
 Its different from yours. Yours has, it is
wrongly labled should be impL:
 % (C,X->Y=>Z) --> [(C=>X),(C,Y=>Z)]    /* A */
reduction(impE, (C0=>Z), [C=>X,[Y|C]=>Z], [H]) :-
use_hyp((_->_), C0, (X->Y), C, H).
 On the other hand Hindley–Milner has [App],
which is the real impE:
 % (C=>Y) --> [(C=>X->Y),(C=>X)]    /* B */
https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system#Syntax-directed_rule_system   /* A */ and /* B */ are different:
 /* A */ Belongs to Sequent Calculus
in Gentzens Paper the Systems LJ and LK
 /* B */ Belongs to Natural Deduction,
in Gentzens Paper the Systems NJ and NK
 Algorithm W is what a Prolog interpreter would
do, when the Proof Term is given and when we
want to find the Principal Type.
 For Weekend 3 the task is different, the Type
is given and we want to find the Proof Term.
 Julio Di Egidio schrieb:
On 19/12/2024 18:40, Julio Di Egidio wrote:
>
My interpretation might be unorthodox, anyway here is concretely what I am doing (a far better approximation that is): <https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system#Syntax-directed_rule_system> >
>
That is, Hindley-Milner upside down:
a *closed* universe with Prop on top...
>
-Julio
>
 

Date Sujet#  Auteur
14 Dec 24 * Advent of Logic 2024: Weekend 158Mild Shock
14 Dec 24 +* Advent of Logic 2024: Weekend 2 (Was: Advent of Logic 2024: Weekend 1)36Mild Shock
14 Dec 24 i`* Re: Advent of Logic 2024: Weekend 3 (Was: Advent of Logic 2024: Weekend 2)35Mild Shock
17 Dec 24 i +* Proofs as programs (Was: Advent of Logic 2024: Weekend 3)33Julio Di Egidio
17 Dec 24 i i+- Re: Proofs as programs (Was: Advent of Logic 2024: Weekend 3)1Julio Di Egidio
17 Dec 24 i i+* Re: Proofs as programs (Was: Advent of Logic 2024: Weekend 3)21Mild Shock
17 Dec 24 i ii+* Re: Proofs as programs (Was: Advent of Logic 2024: Weekend 3)3Mild Shock
17 Dec 24 i iii+- Re: Proofs as programs (Was: Advent of Logic 2024: Weekend 3)1Mild Shock
17 Dec 24 i iii`- Re: Proofs as programs (Was: Advent of Logic 2024: Weekend 3)1Mild Shock
18 Dec 24 i ii`* Re: Proofs as programs17Julio Di Egidio
18 Dec 24 i ii `* Re: Proofs as programs16Mild Shock
18 Dec 24 i ii  `* Re: Proofs as programs15Mild Shock
18 Dec 24 i ii   `* Re: Proofs as programs14Julio Di Egidio
18 Dec 24 i ii    `* Re: Proofs as programs13Mild Shock
18 Dec 24 i ii     `* Hilbert Style proof system (Was: Proofs as programs)12Mild Shock
18 Dec 24 i ii      `* Re: Proofs as programs11Julio Di Egidio
19 Dec 24 i ii       `* What are Simple Types (Was: Proofs as programs)10Mild Shock
19 Dec 24 i ii        +* Re: What are Simple Types (Was: Proofs as programs)2Mild Shock
19 Dec 24 i ii        i`- Re: What are Simple Types (Was: Proofs as programs)1Mild Shock
19 Dec 24 i ii        `* Re: What are Simple Types (Was: Proofs as programs)7Julio Di Egidio
19 Dec 24 i ii         `* Re: What are Simple Types (Was: Proofs as programs)6Mild Shock
19 Dec 24 i ii          +* Re: What are Simple Types (Was: Proofs as programs)2Julio Di Egidio
19 Dec 24 i ii          i`- Re: What are Simple Types (Was: Proofs as programs)1Mild Shock
19 Dec 24 i ii          `* Re: What are Simple Types (Was: Proofs as programs)3Mild Shock
19 Dec 24 i ii           +- Re: What are Simple Types (Was: Proofs as programs)1Mild Shock
19 Dec 24 i ii           `- Re: What are Simple Types (Was: Proofs as programs)1Julio Di Egidio
19 Dec 24 i i+* Re: Proofs as programs (Was: Advent of Logic 2024: Weekend 3)5Julio Di Egidio
22 Dec 24 i ii`* Re: Proofs as programs4Julio Di Egidio
23 Dec 24 i ii `* /* A */ and /* B */ are different (Was: Proofs as programs)3Mild Shock
23 Dec 24 i ii  +- The Task is called the Inhabitation Problem (Was: /* A */ and /* B */ are different)1Mild Shock
23 Dec 24 i ii  `- Re: /* A */ and /* B */ are different (Was: Proofs as programs)1Julio Di Egidio
21 Dec 24 i i`* Curry-Howard Correspondence where? (Was: Proofs as programs (Was: Advent of Logic 2024: Weekend 3))5Mild Shock
21 Dec 24 i i `* A Christmas Miracle (Was: Curry-Howard Correspondence where?)4Mild Shock
21 Dec 24 i i  `* Re: A Christmas Miracle (Was: Curry-Howard Correspondence where?)3Mild Shock
21 Dec 24 i i   `* Re: A Christmas Miracle (Was: Curry-Howard Correspondence where?)2Mild Shock
21 Dec 24 i i    `- Re: A Christmas Miracle (Was: Curry-Howard Correspondence where?)1Mild Shock
27 Dec 24 i `- 4th Family Member: Relevant Logic (Re: Advent of Logic 2024: Weekend 3)1Mild Shock
20 Dec 24 +* Advent of Logic 2024: Specification and Deadline (Was: Advent of Logic 2024: Weekend 1)20Mild Shock
20 Dec 24 i+* Re: Advent of Logic 2024: Specification and Deadline (Was: Advent of Logic 2024: Weekend 1)15Mild Shock
20 Dec 24 ii+- Advent of Logic 2024: Solution Weekend 2 (Was: Advent of Logic 2024: Specification and Deadline)1Mild Shock
20 Dec 24 ii`* Repetition vs Use (Was: Advent of Logic 2024: Specification and Deadline)13Julio Di Egidio
20 Dec 24 ii `* Re: Repetition vs Use (Was: Advent of Logic 2024: Specification and Deadline)12Mild Shock
20 Dec 24 ii  `* Re: Repetition vs Use (Was: Advent of Logic 2024: Specification and Deadline)11Julio Di Egidio
20 Dec 24 ii   `* Please be patient (Was: Repetition vs Use)10Mild Shock
20 Dec 24 ii    `* Happy Now? (Was: Please be patient)9Mild Shock
20 Dec 24 ii     `* Re: Happy Now? (Was: Please be patient)8Julio Di Egidio
21 Dec 24 ii      `* What is it, a Bird or an Airplane? (Was: Happy Now? (Was: Please be patient))7Mild Shock
21 Dec 24 ii       `* Re: What is it, a Bird or an Airplane? (Was: Happy Now? (Was: Please be patient))6Julio Di Egidio
21 Dec 24 ii        `* Re: What is it, a Bird or an Airplane? (Was: Happy Now? (Was: Please be patient))5Mild Shock
21 Dec 24 ii         +- Re: What is it, a Bird or an Airplane? (Was: Happy Now? (Was: Please be patient))1Mild Shock
21 Dec 24 ii         `* Re: What is it, a Bird or an Airplane? (Was: Happy Now? (Was: Please be patient))3Julio Di Egidio
21 Dec 24 ii          `* Re: What is it, a Bird or an Airplane? (Was: Happy Now? (Was: Please be patient))2Mild Shock
21 Dec 24 ii           `- Re: What is it, a Bird or an Airplane? (Was: Happy Now? (Was: Please be patient))1Julio Di Egidio
21 Dec 24 i`* Advent of Logic 2024: Friendly Reminder (Re: Advent of Logic 2024: Specification and Deadline)4Mild Shock
24 Dec 24 i `* Re: Advent of Logic 2024: Friendly Reminder (Re: Advent of Logic 2024: Specification and Deadline)3Mild Shock
24 Dec 24 i  `* Linear Logic as Natural Deduction (Was: Advent of Logic 2024: Friendly Reminder)2Mild Shock
24 Dec 24 i   `- Re: Linear Logic as Natural Deduction (Was: Advent of Logic 2024: Friendly Reminder)1Mild Shock
17 Jan 25 `- Combinatorial Simple Typed Solution (Re: Advent of Logic 2024: Weekend 1)1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal