Skip to content

Halachic Concepts for Encoders

This document provides the essential halachic concepts that every Mistaber encoder must understand. It covers authority hierarchy, obligation levels, doubt resolution, dispute patterns, and contextual modifiers that appear throughout the halachic literature.

Authority Hierarchy

Madrega Levels (Obligation Hierarchy)

Halacha distinguishes between different levels of obligation, each with distinct properties for reasoning:

Madrega Hebrew Source Stringency Safek Rule
d_oraita דאורייתא Torah Highest L'chumra (stringent)
d_rabanan דרבנן Rabbinic High L'kula (lenient)
minhag מנהג Custom Medium Varies by minhag type
chumra חומרא Stringency Low Optional
graph TD
    A[d_oraita<br/>Torah commandments] --> B[d_rabanan<br/>Rabbinic enactments]
    B --> C[minhag<br/>Customs]
    C --> D[chumra<br/>Stringencies]

    style A fill:#e8f5e9
    style B fill:#e3f2fd
    style C fill:#fff3e0
    style D fill:#fce4ec

D'oraita (Torah Level)

Definition: Commandments derived directly from the written Torah or oral tradition transmitted from Sinai.

Properties: - Highest stringency level - Safek d'oraita l'chumra (doubt is resolved stringently) - Violations may carry korban (sacrifice) obligation - Cannot be nullified by rabbinic authority

Encoding Example:

% Beheima + Chalav is d'oraita
% Source: "Lo tevashel gedi bachalev imo" (Shemot 23:19)
rule(r_bb_beheima_achiila).
makor(r_bb_beheima_achiila, sa("yd:87:1")).
makor(r_bb_beheima_achiila, torah("Shemot 23:19")).
madrega(r_bb_beheima_achiila, d_oraita).
scope(r_bb_beheima_achiila, mechaber).

asserts(mechaber, issur(achiila, M, d_oraita)) :-
    is_beheima_chalav_mixture(M).

D'rabanan (Rabbinic Level)

Definition: Laws enacted by the Sages, including: - Gezeirot (protective decrees) - Takkanot (positive enactments) - Minhagim that became binding

Properties: - High stringency but less than d_oraita - Safek d'rabanan l'kula (doubt is resolved leniently) - Subject to rabbinic modification in extreme circumstances - Violations generally do not carry korban obligation

Encoding Example:

% Of (poultry) + Chalav is d'rabanan
% Source: SA YD 87:3 "eino assur ela miderabanan"
rule(r_bb_of_achiila).
makor(r_bb_of_achiila, sa("yd:87:3")).
makor(r_bb_of_achiila, gemara("Chullin 104a")).
madrega(r_bb_of_achiila, d_rabanan).
scope(r_bb_of_achiila, mechaber).

asserts(mechaber, issur(achiila, M, d_rabanan)) :-
    is_of_chalav_mixture(M).

Minhag (Custom)

Definition: Practices adopted by communities that become binding through acceptance.

Types of Minhag: | Type | Hebrew | Binding Force | Example | |------|--------|---------------|---------| | Minhag Avoteinu | מנהג אבותינו | Strongly binding | Kitniyot on Pesach | | Minhag HaMakom | מנהג המקום | Binding in location | Local prayer customs | | Minhag Tov | מנהג טוב | Good practice | Additional stringencies | | Minhag Shtut | מנהג שטות | Not binding | Baseless practices |

Encoding Example:

% Ashkenazi 6-hour waiting time is minhag
rule(r_ashkenaz_waiting_6hours).
makor(r_ashkenaz_waiting_6hours, rema("yd:89:1")).
madrega(r_ashkenaz_waiting_6hours, minhag).
scope(r_ashkenaz_waiting_6hours, rema).

asserts(rema, waiting_hours(6)).

Chumra (Stringency)

Definition: A practice that goes beyond the strict letter of the law.

Properties: - Optional for individuals (unless accepted as vow) - Cannot be imposed on others - May become minhag if widely adopted - Important to distinguish from actual obligations

Encoding Example:

% Some are stringent to wait for fish before dairy (beyond the law)
rule(r_chumra_fish_then_dairy_wait).
makor(r_chumra_fish_then_dairy_wait, custom("Various communities")).
madrega(r_chumra_fish_then_dairy_wait, chumra).
scope(r_chumra_fish_then_dairy_wait, base).

% This is NOT an issur - just a recommended practice
asserts(base, recommended_practice(wait_after_fish_before_dairy)).

Safek Resolution Principles

Core Safek Rules

The resolution of halachic doubt depends on the madrega of the underlying obligation:

graph TD
    A[Safek<br/>Halachic Doubt] --> B{What madrega?}

    B -->|d_oraita| C[ספק דאורייתא לחומרא<br/>Resolve stringently]
    B -->|d_rabanan| D[ספק דרבנן לקולא<br/>Resolve leniently]
    B -->|minhag| E[Depends on minhag type]

    C --> F[Treat as if issur exists]
    D --> G[Treat as if issur does not exist]

Safek D'oraita L'chumra

Hebrew: ספק דאורייתא לחומרא

Rule: When in doubt about a Torah-level obligation, rule stringently.

Encoding:

% Default safek policy for all worlds
safek_policy(base, d_oraita, l_chumra).

% Resolution rule
resolves_to(W, safek(issur(Action, Food, d_oraita)), assur) :-
    world(W),
    safek_policy(W, d_oraita, l_chumra).

Application Example:

% If unsure whether meat was properly slaughtered (safek nevela)
% and eating nevela is d_oraita...
safek(is_nevela(meat)).
madrega(eating_nevela, d_oraita).

% Result: Treat meat as if it IS nevela (stringent)
% because safek d_oraita l_chumra

Safek D'rabanan L'kula

Hebrew: ספק דרבנן לקולא

Rule: When in doubt about a rabbinic obligation, rule leniently.

Encoding:

% Default safek policy for d_rabanan
safek_policy(base, d_rabanan, l_kula).

% Resolution rule
resolves_to(W, safek(issur(Action, Food, d_rabanan)), mutar) :-
    world(W),
    safek_policy(W, d_rabanan, l_kula).

Mishnah Berurah Exception

The Mishnah Berurah world uses stricter safek handling:

safek_policy(ashk_mb, d_rabanan, l_chumra).  % Stricter than base

Sfek Sfeika (Double Doubt)

Hebrew: ספק ספיקא

Rule: Two independent doubts may permit even a d_oraita matter.

Conditions for Valid Sfek Sfeika: 1. Doubts must be independent (not dependent on each other) 2. Each doubt must be reasonable (not far-fetched) 3. Cannot be resolved through investigation

Encoding:

% Define sfek sfeika predicate
sfek_sfeika(Food, Doubt1, Doubt2) :-
    safek(Food, Doubt1),
    safek(Food, Doubt2),
    independent_doubts(Doubt1, Doubt2),
    not resolvable_by_investigation(Food).

% Sfek sfeika permits even d_oraita
resolves_to(W, Food, mutar) :-
    sfek_sfeika(Food, _, _),
    not explicit_issur(W, Food).

Example:

% Doubt 1: Is this meat from a kosher species? (50/50)
% Doubt 2: Was it slaughtered properly? (50/50)
%
% If both doubts are independent, sfek sfeika applies
% and the meat may be permitted in some circumstances

safek(meat1, species_unknown).
safek(meat1, shechita_unknown).
independent_doubts(species_unknown, shechita_unknown).

% Result: sfek_sfeika(meat1, species_unknown, shechita_unknown)

Chazaka (Presumption)

Hebrew: חזקה

Definition: A legal presumption based on established status.

Types of Chazaka: | Type | Hebrew | Meaning | Example | |------|--------|---------|---------| | Chazaka D'mei'ikara | חזקה דמעיקרא | Original status presumed to continue | Vessel was clean, presumed clean | | Chazaka D'hashta | חזקה דהשתא | Current status presumed | If currently kosher, presumed kosher | | Rov | רוב | Majority presumption | Most meat in Jewish market is kosher |

Encoding:

% Chazaka: vessel retains its original status
maintains_status(Vessel, Status) :-
    vessel(Vessel),
    original_status(Vessel, Status),
    not status_changed(Vessel).

% Example: A vessel used for meat retains meat status
vessel_status(pot1, basar) :-
    maintains_status(pot1, basar).

Machloket Patterns

Types of Halachic Disputes

Pattern Description Encoding Approach
Mechaber vs Rema Sefardi vs Ashkenazi baseline Separate worlds
Rishonim dispute Pre-SA disagreement Document in makor, encode SA resolution
Acharonim dispute Post-SA disagreement Encode in child worlds
Practical vs theoretical Application differs Context modifiers

The Mechaber-Rema Pattern

The most common machloket in Yoreh Deah:

% Mechaber's position (Sefardi baseline)
rule(r_mechaber_position).
makor(r_mechaber_position, sa("yd:XX:Y")).
scope(r_mechaber_position, mechaber).
asserts(mechaber, some_ruling(X)).

% Rema's disagreement (Ashkenazi baseline)
rule(r_rema_position).
makor(r_rema_position, rema("yd:XX:Y")).
scope(r_rema_position, rema).
override(rema, some_ruling(X), alternative_ruling).
asserts(rema, alternative_ruling(X)).

% Mark the machloket
machloket(topic_name, mechaber, rema, X) :-
    some_condition(X).

Fish and Dairy: Complete Machloket Example

% ============================================================
% MACHLOKET: Fish with Dairy
% Mechaber: Forbidden due to sakana (danger)
% Rema: Permitted (no sakana concern)
% ============================================================

% === Mechaber's Position ===
rule(r_bb_dag_sakana).
makor(r_bb_dag_sakana, sa("yd:87:3")).
makor(r_bb_dag_sakana, beit_yosef("yd:87")).
scope(r_bb_dag_sakana, mechaber).

% Mechaber asserts sakana
asserts(mechaber, sakana(M)) :-
    is_dag_chalav_mixture(M).

% Sakana leads to eating prohibition
asserts(mechaber, issur(achiila, M, sakana)) :-
    is_dag_chalav_mixture(M).

% === Rema's Override ===
rule(r_rema_dag_chalav_mutar).
makor(r_rema_dag_chalav_mutar, rema("yd:87:3")).
makor(r_rema_dag_chalav_mutar, taz("yd:87:3")).
makor(r_rema_dag_chalav_mutar, shach("yd:87:5")).
scope(r_rema_dag_chalav_mutar, rema).

% Override the sakana ruling
override(rema, sakana(M), no_sakana) :-
    is_dag_chalav_mixture(M).

override(rema, issur(achiila, M, sakana), permitted) :-
    is_dag_chalav_mixture(M).

% Explicitly assert permission
asserts(rema, heter(achiila, M)) :-
    is_dag_chalav_mixture(M).

asserts(rema, no_sakana(M)) :-
    is_dag_chalav_mixture(M).

% === Mark the Machloket ===
machloket(dag_chalav_sakana, mechaber, rema, M) :-
    is_dag_chalav_mixture(M).

Rishonim Disputes Encoded Through SA

When Rishonim disagree and the SA rules:

% SA follows Rambam, not Rosh, on this point
rule(r_following_rambam_view).
makor(r_following_rambam_view, sa("yd:XX:Y")).
makor(r_following_rambam_view, rambam("Hilchot X:Y:Z")).
% Note: Rosh's view in Tur, but SA did not follow it
% See: Beit Yosef for reasoning

scope(r_following_rambam_view, mechaber).
asserts(mechaber, the_ruling(X)).

Context Modifiers

Lechatchila vs Bedieved

Lechatchila (לכתחילה): The ideal, ab initio ruling - what should be done.

Bedieved (בדיעבד): After the fact - what is accepted if already done.

% Context encoding
context_type(lechatchila).  % Ideal/beforehand
context_type(bedieved).     % After the fact

% Example: Bitul may work bedieved but not lechatchila
asserts(mechaber, issur(achiila, M, d_rabanan)) :-
    mixture(M),
    taam_issur(M),
    context(lechatchila).

asserts(mechaber, heter(achiila, M)) :-
    mixture(M),
    taam_issur(M),
    bitul_shishim(M),    % Has 60:1 ratio
    context(bedieved).   % Already mixed

Hefsed Merubah (Significant Loss)

Hebrew: הפסד מרובה

Definition: Circumstances involving substantial financial or material loss.

Effect: May permit reliance on lenient opinions that would not apply otherwise.

% Context: significant loss
context(ctx_hefsed).

% Rule may be more lenient in hefsed
asserts(W, heter(achiila, M)) :-
    world(W),
    mixture(M),
    safek_issur(M, d_rabanan),  % Doubtful rabbinic issur
    context(ctx_hefsed),         % Significant loss
    has_lenient_opinion(M).      % Lenient opinion exists

Shaat HaDchak (Pressing Circumstances)

Hebrew: שעת הדחק

Definition: Emergency or pressing circumstances that require immediate action.

Effect: Similar to hefsed, may permit lenient rulings.

% Context: pressing circumstances
context(ctx_shaat_hadchak).

% More lenient in shaat hadchak
asserts(W, permitted_b_shaat_hadchak(Action, Food)) :-
    world(W),
    safek_issur(Food, d_rabanan),
    context(ctx_shaat_hadchak),
    not explicit_issur_doraita(Food).

Context Hierarchy

graph TD
    A[ctx_normal<br/>Standard circumstances] --> B[ctx_hefsed<br/>Significant loss]
    B --> C[ctx_shaat_hadchak<br/>Pressing circumstances]
    C --> D[ctx_choleh<br/>Sick person needs]
    D --> E[ctx_pikuach_nefesh<br/>Life-threatening]

    style E fill:#ffcdd2

Encoding Context Levels:

% Context strength ordering
context_strength(ctx_normal, 1).
context_strength(ctx_hefsed, 2).
context_strength(ctx_shaat_hadchak, 3).
context_strength(ctx_choleh, 4).
context_strength(ctx_pikuach_nefesh, 5).

% Higher context may override lower stringency
may_override(Context1, Stringency) :-
    context_strength(Context1, Strength),
    stringency_threshold(Stringency, Threshold),
    Strength >= Threshold.

Sakana vs Issur

Key Distinction

Issur (איסור): A halachic prohibition based on Torah or rabbinic law.

Sakana (סכנה): A danger or health concern.

% Issur has madrega levels
issur(Action, Food, Madrega) :-
    madrega_type(Madrega).  % d_oraita, d_rabanan, etc.

% Sakana is a separate category
sakana(Thing) :-
    is_dangerous(Thing).

% Both can lead to prohibition, but with different properties
asserts(W, forbidden_action(achiila, Food)) :-
    holds(issur(achiila, Food, _), W).

asserts(W, forbidden_action(achiila, Food)) :-
    holds(sakana(Food), W).

Differences in Treatment

Aspect Issur Sakana
Source Torah/Rabbinic law Health/danger
Bitul May apply (60:1) Generally does not apply
Safek Depends on madrega Chamira sakanta me'issura
Stringency Per madrega Often stricter than issur

Chamira Sakanta Me'issura

Hebrew: חמירא סכנתא מאיסורא

Translation: Danger is more stringent than prohibition.

Implication: Health concerns are treated more strictly than halachic prohibitions.

% Sakana is more stringent than issur
more_stringent(sakana, issur(_, _, d_rabanan)).
more_stringent(sakana, issur(_, _, minhag)).

% Sakana does not have bitul
not_subject_to_bitul(X) :-
    sakana(X).

% Even safek sakana is treated stringently
resolves_to(W, safek_sakana(X), forbidden) :-
    world(W).  % In all worlds, safek sakana is stringent

Kli (Vessel) Status

Vessel Categories

Category Hebrew Definition Example
Kli Rishon כלי ראשון Vessel on fire/heat source Pot on stove
Kli Sheni כלי שני First transfer from heat Bowl soup was poured into
Kli Shlishi כלי שלישי Second transfer Cup from the bowl

Heat Transfer Rules

% Kli status affects cooking (bishul)
kli_status(Vessel, kli_rishon) :-
    on_heat_source(Vessel).

kli_status(Vessel2, kli_sheni) :-
    transferred_from(Vessel1, Vessel2),
    kli_status(Vessel1, kli_rishon).

kli_status(Vessel3, kli_shlishi) :-
    transferred_from(Vessel2, Vessel3),
    kli_status(Vessel2, kli_sheni).

% Kli rishon can cause bishul
causes_bishul(Vessel) :-
    kli_status(Vessel, kli_rishon),
    temp_status(Vessel, yad_soledet_bo).

% Kli sheni generally does not cause bishul
% (with exceptions for certain foods - kalei habishul)
not_causes_bishul(Vessel) :-
    kli_status(Vessel, kli_sheni),
    not contains_kalei_habishul(Vessel).

Bitul (Nullification)

Bitul Shishim (60:1 Nullification)

Hebrew: ביטול בששים

Rule: A forbidden substance is nullified if mixed with 60 times its volume of permitted substance.

% Bitul shishim
is_batel_b_shishim(Mixture) :-
    mixture(Mixture),
    issur_component(Mixture, Issur),
    heter_component(Mixture, Heter),
    ratio(Mixture, Heter, Issur, Ratio),
    Ratio >= 60.

% Bitul allows consumption
asserts(W, heter(achiila, M)) :-
    world(W),
    is_batel_b_shishim(M),
    not davar_sheyesh_lo_matirin(M),  % Not a case that will become permitted
    not min_b_mino(M).                 % Or special same-species rules

Exceptions to Bitul

Exception Hebrew Rule
Davar sheyesh lo matirin דבר שיש לו מתירין Thing that will become permitted - not nullified
Min b'mino מין במינו Same species mixing - stricter rules
Beriah בריה Whole creature - not nullified
Chatichah hare'uyah l'hitchabed חתיכה הראויה להתכבד Important piece - not nullified
% Exceptions prevent bitul
not_subject_to_bitul(M) :-
    davar_sheyesh_lo_matirin(M).

not_subject_to_bitul(M) :-
    contains_beriah(M).

not_subject_to_bitul(M) :-
    chatichah_harauyah_l_hitchabed(M).

Encoding Reference Quick Table

Concept Predicate Example
Torah level madrega(R, d_oraita) Beheima + chalav
Rabbinic level madrega(R, d_rabanan) Of + chalav
Custom madrega(R, minhag) 6-hour wait
Stringency madrega(R, chumra) Extra precaution
Doubt safek(Food) Unknown status
Double doubt sfek_sfeika(F, D1, D2) Two independent doubts
Danger sakana(Food) Fish + dairy (Mechaber)
Dispute machloket(Topic, P1, P2, X) Mechaber vs Rema
Normal context ctx_normal Standard circumstances
Loss context ctx_hefsed Significant loss
Emergency ctx_shaat_hadchak Pressing circumstances
Vessel status kli_status(V, kli_rishon) Pot on fire
Nullification is_batel_b_shishim(M) 60:1 ratio