Three out of five in Logical English

three-out-of-five-le.le · output · proof · check · playground


The question

A submission qualifies if it meets at least three of five checklist criteria. Some records also contain criteria outside the checklist. Which submissions qualify, and how many checklist criteria does each one meet?

What we tell eyemind

The scoring rule enumerates criteria 1 through 5 and counts those the submission meets. The count is zero when no criterion matches. A separate rule compares the score with the threshold of three.

What eyemind concludes

Submission Checklist score Qualifies
Sample 3 Yes
Near miss 2  
Complete submission 5 Yes
Empty submission 0  

The sample meets criteria 1, 3, 4, 6 and 7. The checked score counts the three that are on the checklist.

struct('le:answer', 'scores', 'checklist', 'sample', 3)

What the proof establishes

The saved proof is checked. It accounts for every match in the count and every submission that reaches the threshold.

Try it

node bin/eyemind.js examples/three-out-of-five-le.le
node bin/eyemind.js --check-proof examples/proof/three-out-of-five-le.js examples/three-out-of-five-le.le

Add near miss meets criterion 5. to the scenario. Its score rises to three and it qualifies.