# Microtheories and Inferencing

This exercise should follow the lesson calledÂ Microtheories.

This exercise is divided into three parts:

Part 1: Preliminary Knowledge Entry

Part 2: Creating New Microtheories

Part 3: Querying Within Microtheories

### Part 1: Preliminary Knowledge Entry

First, locate the constant #\$January, and verify these facts are available in #\$CalendarsMt, asserting them if necessary (Use the “Assert” page available through your browser via the Toolbar):

(#\$isa #\$January #\$MonthOfYearType)

(#\$genls #\$MonthOfYearType #\$TemporalObjectType)

(#\$genls #\$January #\$CalendarMonth)

Next, locate or create the constant #\$NewYearsDay, and assert in #\$CalendarsMt, if necessary:

(#\$isa #\$NewYearsDay #\$TemporalObjectType)

### Step 2: Creating New Microtheories

Next, you’re going to work with a microtheory that contains information true and relevant in the Northern Hemisphere. It is called (predictably) #\$NorthernHemisphereMt. Make sure that the following assertions are available in your Cyc image, asserting them if necessary:

(#\$isa #\$NorthernHemisphereMt #\$GeneralMicrotheory)

[in #\$BaseKB]

(#\$subsumesIntervalType #\$CalendarWinter #\$January)

[in #\$NorthernHemisphereMt]

Next, create #\$WesternCultureMt, which will contain information true and relevant in Western cultures. Use the “Create” page available in your browser via your toolbar to create the constant #\$WesternCultureMt. As with #\$NorthernHemisphereMt, assert:

(#\$isa #\$WesternCultureMt #\$GeneralMicrotheory)

[in #\$BaseKB]

Assign #\$HumanSocialLifeMt as a #\$genlMt:

(#\$genlMt #\$WesternCultureMt #\$HumanSocialLifeMt)

[in #\$BaseKB]

In #\$WesternCultureMt, assert:

(#\$genls #\$NewYearsDay #\$LegalHoliday)

(#\$subsumesIntervalType #\$January #\$NewYearsDay)

Now create #\$NorthAmericanCultureMt, and then assert that it is an instance of #\$GeneralMicrotheory.

Assert that #\$NorthernHemisphereMt and #\$WesternCultureMt are #\$genlMts of #\$NorthAmericanCultureMt.

### Step 3: Querying within Microtheories

Go to the Ask interface, and set these four resource constraints:

• Get everything
• Run for 20 seconds
• 1 backchain step
• Infinite depth

Using the “Advanced Inference Parameters” set “Cache backward query results” to “Yes”.

(#\$intersectsIntervalType #\$CalendarWinter #\$NewYearsDay)

Examine #\$NewYearsDay, and note that the assertion you just asked about has been inferred:

(#\$intersectsIntervalType #\$CalendarWinter #\$NewYearsDay)

Now try the ASK in #\$CalendarsMt, #\$NorthernHemisphereMt, and #\$WesternCultureMt.

(#\$intersectsIntervalType #\$CalendarWinter #\$NewYearsDay)

Now ask if every #\$NewYearsDay is a #\$LegalHoliday in #\$CalendarsMt, in #\$NorthAmericanCultureMt, and #\$NorthernHemisphereMt:

(#\$genls #\$NewYearsDay #\$LegalHoliday)

Now try the following on your own:

If we create #\$AustralianLifeMt, which existing Mts would be its #\$genlMts?

What other Mts would we want to add as its #\$genlMts?

Which assertions should hold true of #\$NewYearsDay in #\$AustralianLifeMt?

If we create #\$ArabianPeninsulaLifeMt, which existing Mts would be its #\$genlMts?

What other Mts would we want to add as its #\$genlMts?

Which assertions should hold true of #\$NewYearsDay in #\$ArabianPeninsulaLifeMt?

Note that the Arabian Peninsula is located in the Northern Hemisphere, and the Islamic New Year’s Day is calculated according to the #\$IslamicLunarCalendar.