Skip to content

feat(ontology): encode YD 87:8 — nasiyovei d'chalva (mei chalav boundary) - #257

Closed
levi770 wants to merge 2 commits into
mainfrom
session/RNekhoda/yd_87-8
Closed

feat(ontology): encode YD 87:8 — nasiyovei d'chalva (mei chalav boundary)#257
levi770 wants to merge 2 commits into
mainfrom
session/RNekhoda/yd_87-8

Conversation

@levi770

@levi770 levi770 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Encoding Summary

  • Reference: SA YD 87:8
  • Topic: Nasiyovei d'chalva — distinct from mei chalav; d'oraita status
  • Rules: 20 encoded (seif_8.hll)
  • Worlds: base, mechaber, rema, shach
  • Tests: 15 QA scenarios, 11 pytest, tech-health 19/19
  • Encoding Decisions: 4 total (3 definitive, 1 probable)

Key Halachic Content

  • Nasiyovei d'chalva (whey pressed from cheese curd) ≠ mei chalav → d'oraita with beheima
  • Yesh mi she'omer = Rosh (Chullin 8:51:2): «ואני אומר דנסיובי דחלבא אסור מדאורייתא»
  • Three prohibitions: bishul + achiila + hanaah (even hefsed meruba, per PMG SD 87:23)
  • Machloket: Tosafot/Behag/Pri Chadash → d'rabanan (via Peleti sk16 + PMG SD 87:23)
  • Boundary: of/chaya + nasiyovei = d'rabanan
  • Marit ayin for of+nasiyovei: Shach (yd:87:8) disputes Rema's exemption

Source References

  • Primary: Rosh on Chullin 8:51:2 → Tur YD 87 → Beit Yosef 87:7 → SA YD 87:8
  • PMG SD 87:23, Kaf HaChayim sk71, Peleti sk16, Chullin 114a

New Predicates

nasiyovei_d_chalva (food_category), mixture_has_nasiyovei, is_nasiyovei_chalav_mixture, is_nasiyovei_of_mixture, is_nasiyovei_chaya_mixture, rema_of_exempt_nasiyovei

Artifacts

Archived to mistaber/corpus/yoreh_deah/siman_87/seif_8/

Fixes Applied

  • torah() removed from makor for achiila/bishul rules (Shemot 23:19 is general BB source, not nasiyovei-specific)
  • is_derech_bishul default added for is_nasiyovei_chalav_mixture (mirrors seif_1 pattern)

Generated by Mistaber Code — Computational Halacha Encoding Agent

Mistaber Code added 2 commits June 3, 2026 15:17
…ary)

Encode Shulchan Aruch Yoreh Deah 87:8: distinction between nasiyovei
d'chalva (whey pressed from cheese curd, d'oraita) and mei chalav
(post-cooking residual water, d'rabanan).

Encoding Summary:
- 20 rules encoded (seif_8.hll)
- Worlds: base, mechaber, rema, shach
- Machloket: Rosh/SA d'oraita vs Tosafot/Behag/Pri Chadash d'rabanan
- Marit ayin: Shach disputes Rema for of+nasiyovei (r_nasiyovei_of_shach_marit_ayin)
- Tests: 15 QA scenarios, 11 pytest, tech-health 19/19
- Encoding Decisions: 4 total (3 definitive, 1 probable)

New predicates: nasiyovei_d_chalva, mixture_has_nasiyovei,
is_nasiyovei_chalav_mixture, is_nasiyovei_of_mixture,
is_nasiyovei_chaya_mixture, rema_of_exempt_nasiyovei

Sources:
- Primary: Rosh on Chullin 8:51:2 (ואני אומר דנסיובי דחלבא אסור מדאורייתא)
- Chain: Rosh → Tur YD 87 → Beit Yosef 87:7 → SA YD 87:8
- Commentaries: PMG SD 87:23 (hanaah assur even hefsed meruba),
  Peleti sk16 (Tosafot/Behag machloket), Kaf HaChayim sk71

Fixes applied during encoding cycle:
- torah() removed from makor for nasiyovei achiila/bishul rules (HA-5)
- is_derech_bishul default added for is_nasiyovei_chalav_mixture

Reviewed-by: RNekhoda
Corpus-artifact: corpus-sources-YD-87-8.yaml

Co-authored-by: Mistaber Code <code@mistaber.ai>
Co-authored-by: Mistaber Code <code@mistaber.ai>
Copilot AI review requested due to automatic review settings June 3, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Verdict: CHANGES REQUESTED
Counts: [CRITICAL] 4 · [IMPORTANT] 3 · [NIT] 0
Scope detected: encoding-session
Highlights:

  • Missing required archived artifact: scenario_neg_87_8.hll for seif 87:8.
  • Missing required phase validation reports for seif 87:8 (only validation-report.md is archived/listed).
  • encoding-decisions.yaml schema is not finalized/consistent (alternatives uses approach, hll_refs left empty placeholders).
  • scenario_pos_87_8.hll lacks required @show(holds/2) (and typical holds_via/3) projections.

This PR encodes YD 87:8 (nasiyovei d’chalva vs mei chalav boundary) as a new seif in the basar-bechalav corpus, introducing a new food_category and several helper predicates, plus associated archived artifacts and tests.

Changes:

  • Adds a new corpus seif encoding (dsl + compiled ontology) for YD 87:8, including boundary logic for of/chaya and marit-ayin dispute (Rema vs Shach).
  • Extends vocabulary/ontology registry to include nasiyovei_d_chalva and related derived predicates.
  • Adds archived review/validation/test artifacts for the new seif (but currently missing some required items).

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
mistaber/ontology/meta.lp Registers new enum value + predicate defs/args/hebrew labels for nasiyovei predicates.
mistaber/ontology/corpus/yd_87/seif_8.lp Auto-generated compiled LP for the new seif 87:8 encoding.
mistaber/ontology/corpus/yd_87/base.lp Guards nasiyovei_d_chalva out of mixture_has_chalav/1 to enable dedicated detection.
mistaber/dsl/vocabulary/base.yaml Adds predicate registry entries + enum value for nasiyovei_d_chalva and helpers.
mistaber/dsl/schema/sorts.hll Extends @enum(food_category, ...) with nasiyovei_d_chalva.
mistaber/dsl/corpus/yd_87/seif_8.hll New HLL encoding for SA YD 87:8, including detection + issur/heter rules + marit-ayin dispute.
mistaber/dsl/corpus/yd_87/manifest.yaml Marks seif 8 as encoded in the siman 87 DSL manifest and updates coverage counters.
mistaber/dsl/corpus/yd_87/base.hll Adds nasiyovei_d_chalva exclusion guard in mixture_has_chalav/1 with an encoding note.
mistaber/corpus/yoreh_deah/siman_87/seif_8/validation-report.md Adds the archived validation summary report for seif 8 (contains some inconsistent statements).
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/test_yd_87_8.py Adds pytest coverage for key outcomes (d’oraita vs boundary cases).
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q015_87_8.hll Adds QA scenario for marit-ayin (Rema exemption vs Shach dispute).
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q014_87_8.hll Adds QA scenario for safek classification (unknown liquid type).
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q013_87_8.hll Adds QA scenario for “post-processing becomes mei chalav” boundary.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q012_87_8.hll Adds QA scenario for bedieved poultry + nasiyovei case.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q011_87_8.hll Adds QA scenario around machloket annotation presence.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q010_87_8.hll Adds QA scenario for “3 actions prohibited” d’oraita scope.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q009_87_8.hll Adds QA scenario asserting nasiyovei vs mei chalav detectors don’t overlap.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q008_87_8.hll Adds QA scenario confirming Rema agrees (no gloss).
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q007_87_8.hll Adds QA scenario for chaya + nasiyovei boundary.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q006_87_8.hll Adds QA scenario for makor-chain verification (Rosh attribution).
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q005_87_8.hll Adds QA scenario for of + nasiyovei boundary.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q004_87_8.hll Adds QA scenario for hanaah prohibition even in hefsed meruba.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q003_87_8.hll Adds QA scenario for machloket annotation in output filtering.
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q002_87_8.hll Adds QA scenario for mei_chalav_thin boundary (not d’oraita).
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_q001_87_8.hll Adds QA scenario for positive d’oraita case (beheima + nasiyovei).
mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_pos_87_8.hll Adds the archived positive scenario (missing required holds/2 projection).
mistaber/corpus/yoreh_deah/siman_87/seif_8/review-package.md Adds archived review package (metrics currently out of sync).
mistaber/corpus/yoreh_deah/siman_87/seif_8/qa-set.yaml Adds archived QA set for seif 8.
mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-report.md Adds archived encoding report (summary stats currently out of sync).
mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-mapping.yaml Adds statement→rule mapping artifact.
mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-decisions.yaml Adds archived decisions file (schema placeholders / key mismatches).
mistaber/corpus/yoreh_deah/siman_87/seif_8/corpus-sources.yaml Adds archived source bundle for the seif.
mistaber/corpus/yoreh_deah/siman_87/seif_8/corpus-report.md Adds archived corpus report for the seif.
mistaber/corpus/yoreh_deah/siman_87/seif_8/corpus-chain.mermaid Adds archived derivation chain diagram.
mistaber/corpus/corpus-manifest.yaml Registers seif 8 in the global corpus manifest (artifact list currently incomplete).
CLAUDE.md Updates documentation example for checkpoint artifact payload format.

Comment on lines +11 to +13
@show(is_nasiyovei_chalav_mixture/1)
@show(is_derech_bishul/1)
@show(asserts/2)
Comment on lines +604 to +606
- mistaber/corpus/yoreh_deah/siman_87/seif_8/qa-set.yaml
- mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/scenario_pos_87_8.hll
- mistaber/corpus/yoreh_deah/siman_87/seif_8/tests/test_yd_87_8.py
Comment on lines +600 to +603
- mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-report.md
- mistaber/corpus/yoreh_deah/siman_87/seif_8/encoding-mapping.yaml
- mistaber/corpus/yoreh_deah/siman_87/seif_8/validation-report.md
- mistaber/corpus/yoreh_deah/siman_87/seif_8/review-package.md
Comment on lines +27 to +42
alternatives:
- approach: "Определить само производство нсиювей как событие"
not_chosen_because: >
ША не обсуждает изготовление сыра как запрещённое действие; его
интересует только статус уже образовавшейся жидкости при её смешивании
с мясом.
- approach: "Чисто классификационное правило без события-смеси"
not_chosen_because: >
Не позволяет задавать запросы к движку о конкретных сценариях (mixture
+ contains + food_type); нормативное следствие нельзя выразить
без предиката смеси.
sources:
- "sa:yd:87:8"
- "tur:yd:87"
hll_refs: [] # заполняется в фазе 2

Comment on lines +19 to +22
- Disjointness: **passed** — nasiyovei_d_chalva не пересекается с mei_chalav_thin
- Madrega Consistency: **passed** — все d_oraita правила имеют Torah в makor цепочке
- World Inheritance: **passed** — mechaber/rema оба выводят d_oraita
- Makor Integrity: **passed** — 18 rule blocks, все имеют @makor
Comment on lines +14 to +15
| Правил закодировано | 18 |
| Миры | mechaber, rema |
Comment on lines +80 to +82
- **Всего правил:** 18
- **Миры:** mechaber, rema
- **Новые предикаты:** 4 (`@declare`)
@levi770

levi770 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Closing for revisions before merge.

@levi770 levi770 closed this Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants