Armstrong's axioms: infer functional dependencies
Overview
Armstrong’s axioms are sound and complete inference rules for classical functional dependencies. Reflexivity: if Y is a subset of X, X→Y. Augmentation: X→Y implies XZ→YZ (juxtaposition means set union). Transitivity: X→Y and Y→Z imply X→Z. They describe all legal instances, not the execution of a SQL query. Use the same non-NULL training fixture and declared F from the first lesson.
First example
SELECT course_idFROM fd_enrollmentGROUP BY course_idHAVING COUNT(DISTINCT instructor_name)>1ORDER BY course_id;Observed SQLite result (rows in JSON):
[]How it works
Reflexivity gives LC→L. Augment L→N by C to get LC→NC; decomposition then gives LC→N. By decomposing C→TI we obtain C→I; transitivity with I→M yields C→M. Union combines X→Y and X→Z into X→YZ. Decomposition splits a multi-attribute right side. The two SQL queries illustrate C→M and the invalid reverse N→L: two learners named Mina are different IDs. This is a witness against the reverse under the model, not an algorithm for proving implication. Attribute closure provides the practical implication test: Y must be contained in X⁺.
Practical example
SELECT learner_name, COUNT(DISTINCT learner_id)FROM fd_enrollmentGROUP BY learner_nameHAVING COUNT(DISTINCT learner_id)>1ORDER BY learner_name;Observed SQLite result (rows in JSON):
[ [ "Mina", 2 ]]Practice and mistakes
Practice: derive LC→M from the original F using reflexivity and transitivity, or augmentation and decomposition. Do not reverse C→I: instructor 1 teaches two courses. Use the included Python theory checker to compare closures outside ByteMind.