Commit d1a1aeac authored by jfschaefer's avatar jfschaefer

updated fragment 4 (alpha-renaming to avoid shadowing for variable binding)

parent d78a5c21
......@@ -25,7 +25,7 @@
},
{
"cell_type": "code",
"execution_count": 71,
"execution_count": 1,
"metadata": {},
"outputs": [
{
......@@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count": 72,
"execution_count": 2,
"metadata": {},
"outputs": [
{
......@@ -78,7 +78,7 @@
},
{
"cell_type": "code",
"execution_count": 73,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
......@@ -92,7 +92,7 @@
},
{
"cell_type": "code",
"execution_count": 74,
"execution_count": 4,
"metadata": {},
"outputs": [
{
......@@ -125,7 +125,7 @@
},
{
"cell_type": "code",
"execution_count": 75,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
......@@ -146,7 +146,7 @@
},
{
"cell_type": "code",
"execution_count": 76,
"execution_count": 6,
"metadata": {},
"outputs": [
{
......@@ -173,7 +173,7 @@
},
{
"cell_type": "code",
"execution_count": 77,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
......@@ -190,7 +190,7 @@
},
{
"cell_type": "code",
"execution_count": 78,
"execution_count": 8,
"metadata": {},
"outputs": [
{
......@@ -211,7 +211,7 @@
},
{
"cell_type": "code",
"execution_count": 79,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
......@@ -222,7 +222,7 @@
},
{
"cell_type": "code",
"execution_count": 80,
"execution_count": 10,
"metadata": {},
"outputs": [
{
......@@ -255,7 +255,7 @@
},
{
"cell_type": "code",
"execution_count": 81,
"execution_count": 11,
"metadata": {},
"outputs": [
{
......@@ -281,7 +281,7 @@
},
{
"cell_type": "code",
"execution_count": 82,
"execution_count": 12,
"metadata": {},
"outputs": [
{
......@@ -302,7 +302,7 @@
},
{
"cell_type": "code",
"execution_count": 83,
"execution_count": 13,
"metadata": {},
"outputs": [
{
......@@ -319,22 +319,22 @@
"view Frag4GrammarSemantics : http://mathhub.info/Teaching/lbs1920/generated/Frag4Grammar.gf?Frag4Grammar -> ?frag4DomainTheory =\n",
" include ?Frag4CatSemantics ❙\n",
" v1 = [happy] happy ❙\n",
" v2 = [run] run ❙\n",
" v2 = [r] r ❙\n",
" // v3 : VerbTransitive ⟶ NounPhrase ⟶ VerbPhraseInf ❙\n",
" // v3 : (ι ⟶ ι ⟶ o) ⟶ ((ι ⟶ o) ⟶ o) ⟶ (ι ⟶ o) ❙\n",
" v3 = [VT,np] [x] np (VT x) ❙\n",
" \n",
" // v4 : NounPhrase ⟶ VerbPhraseFin \"the teacher\" -> \"is the teacher\"❙\n",
" v4 = [NP] [x] NP ([y] x == y) ❙\n",
" v5 = [and, run, laugh] ([john] and (run john) (laugh john)) ❙\n",
" v5 = [and, r, l] ([john] and (r john) (l john)) ❙\n",
" v6 = [and, runs, laughs] [john] and (runs john) (laughs john) ❙\n",
" v7 = [laugh] [john] ¬ (laugh john) ❙\n",
" v7 = [l] [john] ¬ (l john) ❙\n",
" v8 = [P] [john] (P john) ❙\n",
" // n1 : ProperName ⟶ NounPhrase ❙\n",
" n1 = [john] [P] (P john) ❙\n",
" // n2 : Noun ⟶ NounPhrase ❙\n",
" n2 = [n : ι ⟶ o] [P : ι ⟶ o] (P (the n)) ❙\n",
" s1 = [john] [run] (john run) ❙\n",
" s1 = [john] [r] (john r) ❙\n",
" s2 = [x] ¬ x ❙\n",
" s3 = [s1,conj,s2] conj s1 s2 ❙\n",
" \n",
......@@ -351,7 +351,7 @@
},
{
"cell_type": "code",
"execution_count": 84,
"execution_count": 14,
"metadata": {},
"outputs": [
{
......@@ -373,7 +373,7 @@
},
{
"cell_type": "code",
"execution_count": 85,
"execution_count": 15,
"metadata": {},
"outputs": [
{
......@@ -401,7 +401,7 @@
},
{
"cell_type": "code",
"execution_count": 86,
"execution_count": 16,
"metadata": {},
"outputs": [
{
......@@ -423,13 +423,22 @@
},
{
"cell_type": "code",
"execution_count": 89,
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"∀[x](cat x)⇒(run x)"
"∀[x](cat x)⇒(∃[x/r](book x/r)∧(read x x/r))∧(sing x)"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"∀[x](cat x)⇒(∃[x/r](book x/r)∧(read x x/r))∧(sing x)"
]
},
"metadata": {},
......@@ -437,7 +446,7 @@
}
],
"source": [
"parse -cat=Sentence \"every cat is happy\" | construct -v Frag4Semantics"
"parse -cat=Sentence \"every cat reads some book and sings\" | construct -v Frag4Semantics"
]
}
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment