From d5d150cd14254d76dcb2829dc60084d70b0f46b8 Mon Sep 17 00:00:00 2001 From: josd Date: Sun, 10 Nov 2024 00:03:52 +0100 Subject: [PATCH] refreshing --- color/age/age-answer.n3 | 2 +- color/age/age-proof.n3 | 26 +++++++++++++------------- color/age/age-query.n3 | 4 ++-- color/age/age.n3 | 4 +++- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/color/age/age-answer.n3 b/color/age/age-answer.n3 index 1f0767383..a26d2f046 100644 --- a/color/age/age-answer.n3 +++ b/color/age/age-answer.n3 @@ -1,4 +1,4 @@ @prefix : . @prefix xsd: . -:patH :ageAbove "P75Y"^^xsd:duration. +:patH :ageAbove "P80Y"^^xsd:duration. diff --git a/color/age/age-proof.n3 b/color/age/age-proof.n3 index 1146ed8c2..90f34ed7a 100644 --- a/color/age/age-proof.n3 +++ b/color/age/age-proof.n3 @@ -3,19 +3,19 @@ @prefix : . @prefix xsd: . @prefix n3: . -@prefix time: . +@prefix log: . @prefix math: . @prefix var: . skolem:proof a r:Proof, r:Conjunction; r:component skolem:lemma1; r:gives { - :patH :ageAbove "P75Y"^^xsd:duration. + :patH :ageAbove "P80Y"^^xsd:duration. }. skolem:lemma1 a r:Inference; r:gives { - :patH :ageAbove "P75Y"^^xsd:duration. + :patH :ageAbove "P80Y"^^xsd:duration. }; r:evidence ( skolem:lemma2 @@ -25,27 +25,27 @@ skolem:lemma1 a r:Inference; skolem:lemma2 a r:Inference; r:gives { - :patH :ageAbove "P75Y"^^xsd:duration. + :patH :ageAbove "P80Y"^^xsd:duration. }; r:evidence ( skolem:lemma4 - [ a r:Fact; r:gives {"" time:localTime "2024-11-09T22:55:46.629Z"^^xsd:dateTime}] - [ a r:Fact; r:gives {("2024-11-09T22:55:46.629Z"^^xsd:dateTime "1944-08-21"^^xsd:date) math:difference 2531602546.6289997}] - [ a r:Fact; r:gives {2531602546.6289997 math:greaterThan "P75Y"^^xsd:duration}] + [ a r:Fact; r:gives {"2024-08-21T00:00:00.0Z"^^xsd:dateTime log:equalTo "2024-08-21T00:00:00.0Z"^^xsd:dateTime}] + [ a r:Fact; r:gives {("2024-08-21T00:00:00.0Z"^^xsd:dateTime "1944-08-21"^^xsd:date) math:difference 2524608000.0}] + [ a r:Fact; r:gives {2524608000.0 math:greaterThan "P80Y"^^xsd:duration}] ); r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "https://example.org/#patH"]]; r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo "1944-08-21"^^xsd:date]; - r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo "2024-11-09T22:55:46.629Z"^^xsd:dateTime]; - r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 2531602546.6289997]; - r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo "P75Y"^^xsd:duration]; + r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo "2024-08-21T00:00:00.0Z"^^xsd:dateTime]; + r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo 2524608000.0]; + r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo "P80Y"^^xsd:duration]; r:rule skolem:lemma5. skolem:lemma3 a r:Extraction; r:gives { @forAll var:x_0. { - var:x_0 :ageAbove "P75Y"^^xsd:duration. + var:x_0 :ageAbove "P80Y"^^xsd:duration. } => { - var:x_0 :ageAbove "P75Y"^^xsd:duration. + var:x_0 :ageAbove "P80Y"^^xsd:duration. }. }; r:because [ a r:Parsing; r:source ]. @@ -62,7 +62,7 @@ skolem:lemma5 a r:Extraction; var:x_0 :ageAbove var:x_4. } <= { var:x_0 :birthDay var:x_1. - "" time:localTime var:x_2. + var:x_2 log:equalTo "2024-08-21T00:00:00.0Z"^^xsd:dateTime. (var:x_2 var:x_1) math:difference var:x_3. var:x_3 math:greaterThan var:x_4. }. diff --git a/color/age/age-query.n3 b/color/age/age-query.n3 index 4c1bc3fe9..cb96f7f1b 100644 --- a/color/age/age-query.n3 +++ b/color/age/age-query.n3 @@ -3,7 +3,7 @@ # query { - ?S :ageAbove "P75Y"^^xsd:duration. + ?S :ageAbove "P80Y"^^xsd:duration. } => { - ?S :ageAbove "P75Y"^^xsd:duration. + ?S :ageAbove "P80Y"^^xsd:duration. }. diff --git a/color/age/age.n3 b/color/age/age.n3 index 5cf45b8f0..4a1d49f87 100644 --- a/color/age/age.n3 +++ b/color/age/age.n3 @@ -1,6 +1,7 @@ @prefix xsd: . @prefix time: . @prefix math: . +@prefix log: . @prefix : . # person data @@ -9,7 +10,8 @@ # is the age of a person above some duration? { ?S :ageAbove ?A } <= { ?S :birthDay ?B. - "" time:localTime ?D. + #"" time:localTime ?D. + ?D log:equalTo "2024-08-21T00:00:00.0Z"^^xsd:dateTime. (?D ?B) math:difference ?F. ?F math:greaterThan ?A. }.