A car is beautiful in either of its two possible colours.
beetle-le.le · output · proof · check · playground
The question
The beetle is a car, and every car is green or blue. Green things are beautiful, and blue things are beautiful. Is the beetle beautiful?
Historical background
Proof by cases became an explicit inference rule in Gerhard Gentzen’s 1935 natural deduction. In this example both colours lead to the same conclusion, which makes the rule visible in a single split. Gentzen, Untersuchungen über das logische Schließen I
What we tell eyemind
The rule for cars concludes beetle has property green or blue using the
has property … or … template. The facts green entails beauty and
blue entails beauty cover both alternatives, so either colour is enough to
prove beauty. See
disjunction elimination.
What eyemind concludes
% query beautiful
beetle is beautiful.
The check report records the yes-or-no answer as an LS term.
struct('le:answer', 'beautiful')
What the proof establishes
The saved proof is checked against the compiled LS program. The explanation shows where the possibilities come from and why each one is sufficient.
% query beautiful
beetle is beautiful
because beetle has property green or blue
because beetle is a car
and green entails beauty
and blue entails beauty.
Try it
node bin/eyemind.js examples/beetle-le.le
node bin/eyemind.js --program examples/beetle-le.le > /tmp/beetle-le.js
node bin/eyemind.js --proof examples/beetle-le.le
node bin/eyemind.js --check-proof examples/proof/beetle-le.js examples/beetle-le.le
node bin/eyemind.js --explain examples/beetle-le.le
Remove either colour’s entailment. The query then has no answers because the remaining fact covers only one possibility.
