babylon.engine.dialectics

Babylon v2 Dialectic-First Engine.

This package implements the dialectic primitive and its composition operators. Every world object is a Dialectic[A, B]; the simulation is the time-evolution of a graph of dialectics under their motion laws.

Modules:

base: The generic Dialectic[A, B] base class and supporting types. commodity: CommodityDialectic (V1 Ch1). labor_process: LaborProcessDialectic (V1 Ch7§1). production: ProductionDialectic (V1 Ch7§2). wage: WageDialectic (V1 Ch19-22). accumulation: AccumulationDialectic (V1 Ch23-25). primitive_accumulation: PrimitiveAccumulationDialectic (V1 Ch26-33). circulation: CirculationDialectic (V2 Ch1-4). turnover: TurnoverDialectic (V2 Part 2). reproduction: ReproductionDialectic (V2 Ch20-21). distribution: DistributionDialectic (Grundrisse). consumption: ConsumptionDialectic (Grundrisse). surplus_distribution: SurplusDistributionDialectic (V3 Ch9-10). trpf: TRPFDialectic (V3 Ch13-15). credit: CreditDialectic (V3 Ch21-33). rent: RentDialectic (V3 Ch37-47). imperial: ImperialDialectic (V3 Ch14 §V + MLM-TW). crises: All crisis sublation dialectics. consciousness: ClassConsciousnessDialectic (Lukacs/MIM(P)). class_struggle: ClassDialectic — In-Itself ↔ For-Itself. party: PartyDialectic — Vanguard ↔ Mass Line. transformation: TransformationDialectic — Value → Price of Production. sublation: SublationRule — composable Aufhebung lifecycle. world: World, Morphism, and Event models. tick: The pure tick() function. invariants_v2: Universal and per-type invariant checkers. registry: Type-tag → Dialectic subclass mapping.

class babylon.engine.dialectics.Dialectic(**data)[source]

Bases: BaseModel, Generic[A, B]

The fundamental type of the Babylon v2 engine.

Every world object is a Dialectic. The simulation is the time-evolution of a graph of dialectics under their motion laws.

Subclasses must: - Set type_tag as a class-level string (discriminator for serialization). - Implement step() — the motion law T. - Optionally override sublate(), observe(), invariants().

The model is frozen (immutable). step() returns a new Dialectic; it never mutates in place.

Parameters:
  • id (UUID)

  • type_tag (str)

  • pole_a (A)

  • pole_b (B)

  • weight (float)

  • parent_id (UUID | None)

  • tick_created (int)

  • tick_updated (int)

id

Unique identifier for this dialectic instance.

type_tag

Discriminator string set by each subclass.

pole_a

The first pole (typed state A).

pole_b

The second pole (typed state B / Ā).

weight

Principal aspect weight ∈ [-1, 1]. <0 = pole A dominant, 0 = equilibrium, >0 = pole B dominant.

parent_id

UUID of the predecessor if this was produced by sublation.

tick_created

Tick when this dialectic was first instantiated.

tick_updated

Tick when this dialectic was last stepped.

invariants()[source]

Return list of violated invariants for this tick.

An empty list means the dialectic is in a valid state. Subclasses should override to add domain-specific invariants (conservation of labor content, etc.).

Return type:

list[str]

Returns:

List of invariant violation descriptions. Empty = valid.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project onto a measurement basis.

Used by the frontend, analytics, and the morphism graph to read this dialectic’s state without accessing internals.

Returns:

id, type, weight, principal_aspect.

Return type:

Dictionary with at minimum

abstractmethod step(inputs, world)[source]

Motion law T.

Must return a new Dialectic of the same concrete type. The engine checks type stability as a universal invariant.

Parameters:
  • inputs (TickInputs) – Upstream dialectic outputs for this tick.

  • world (WorldView) – Read-only view of the full world graph.

Return type:

Dialectic

Returns:

A new Dialectic instance (same type) representing the next state.

sublate()[source]

Sublation predicate σ.

Returns a successor dialectic when the contradiction resolves into a higher-order form, or None if no sublation occurs.

The default implementation returns None (no sublation).

Return type:

Dialectic[Any, Any] | None

Returns:

Successor Dialectic, or None.

id: UUID
type_tag: str
pole_a: A
pole_b: B
weight: float
parent_id: UUID | None
tick_created: int
tick_updated: int
class babylon.engine.dialectics.TickInputs(**data)[source]

Bases: BaseModel

Upstream dialectic outputs feeding into this tick.

This carries the ε term from the formal definition — the output of upstream dialectics in the morphism graph that feed into this dialectic’s motion law.

Parameters:

upstream (dict[UUID, dict[str, Any]])

upstream

Mapping of source dialectic ID to its observe() output.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

upstream: dict[UUID, dict[str, Any]]
class babylon.engine.dialectics.WorldView(**data)[source]

Bases: BaseModel

Read-only projection of the World for context access.

Provides the World term from the formal definition — read-only access to the rest of the graph for context during step().

The previous field holds a frozen snapshot of the prior tick’s WorldView. This enables the cyclical step pattern from the Grundrisse: each dialectic reads peer outputs from the previous tick, not the current one. The cycle is in the runtime data flow, not the static type graph.

Parameters:
tick

Current simulation tick.

dialectics

Read-only view of all live dialectics by ID.

previous

Frozen snapshot of the prior tick’s WorldView (None at t=0).

find_successor(dialectic_id)[source]

Locate the successor of a sublated dialectic.

Searches all dialectics in the current view for one whose parent_id matches the given dialectic_id.

Parameters:

dialectic_id (UUID) – UUID of the (potentially) sublated dialectic.

Return type:

Any | None

Returns:

The successor dialectic, or None if no successor exists.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

tick: int
dialectics: dict[UUID, Any]
previous: WorldView | None
class babylon.engine.dialectics.SublationRule(**data)[source]

Bases: BaseModel

A composable sublation specification.

Encapsulates the three components of the Aufhebung lifecycle:

  1. threshold — predicate on the dialectic: when to sublate.

  2. successor_factory — callable producing the successor.

  3. name — human-readable identifier for debugging/events.

The rule does NOT own the governance relationship; that is left to the sublated dialectic’s step() method, which can use world.find_successor() to locate and read its governor.

Parameters:
name

Human-readable name for this sublation rule.

threshold

Callable that takes a Dialectic and returns True when the sublation condition is met.

successor_type

The type_tag of the successor dialectic.

successor_factory

Callable that takes the predecessor dialectic and returns the successor instance.

create_successor(dialectic)[source]

Create the successor dialectic.

The successor is produced with parent_id wired to the predecessor’s id, establishing the containment relationship that WorldView.find_successor() can later resolve.

Parameters:

dialectic (Dialectic[Any, Any]) – The predecessor dialectic being sublated.

Return type:

Dialectic[Any, Any]

Returns:

A new Dialectic instance — the successor.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

threshold_met(dialectic)[source]

Evaluate the sublation threshold.

Parameters:

dialectic (Dialectic[Any, Any]) – The dialectic to test.

Return type:

bool

Returns:

True if the threshold condition is satisfied.

name: str
threshold: Callable[[Any], bool]
successor_type: str
successor_factory: Callable[[Any], Dialectic[Any, Any]]
class babylon.engine.dialectics.CommodityDialectic(**data)[source]

Bases: Dialectic[UseValue, ExchangeValue]

The use-value ↔ exchange-value contradiction (V1 Ch1).

Weight reflects whether the commodity is currently being held for use (weight < 0, A dominant) or for exchange (weight > 0, B dominant). Zero is equilibrium.

Motion law:
  • Production events shift weight toward exchange (increase, toward B).

  • Consumption events shift weight toward use (decrease, toward A).

The input convention is an upstream dict with keys:
  • event: "production" or "consumption"

  • intensity: float ∈ [0, 1] controlling shift magnitude

Sublation: None in Phase 1 (commodities persist).

Invariants:
  • SNLT ≥ 0 (enforced by pole validation)

Parameters:
invariants()[source]

Commodity-specific invariants.

Checks:
  • SNLT ≥ 0 (should be guaranteed by pole validation, but we double-check as a runtime safety net).

Return type:

list[str]

Returns:

List of violation descriptions.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project commodity state for frontend rendering.

Returns:

utility, demand, price, snlt.

Return type:

Base observation dict extended with commodity-specific fields

step(inputs, world)[source]

Motion law T for the commodity contradiction.

Production events shift weight toward exchange (pole B, positive); consumption events shift toward use (pole A, negative).

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for own id’s entry with event and intensity keys.

  • world (WorldView) – Read-only world context (unused in Phase 1).

Return type:

CommodityDialectic

Returns:

New CommodityDialectic with updated weight and tick.

type_tag: str
class babylon.engine.dialectics.LaborProcessDialectic(**data)[source]

Bases: Dialectic[ConcreteLabor, AbstractLabor]

The concrete ↔ abstract labor contradiction (V1 Ch1§2, Ch7§1).

Every act of labor has a dual character: it is simultaneously concrete (producing specific use-values) and abstract (creating value as expenditure of human labor-power in general).

Weight semantics:
weight < 0 → concrete labor dominant (A): craft production,

skill matters, qualitative differences prominent.

weight > 0 → abstract labor dominant (B): factory production,

labor is homogenized, only quantity matters.

Motion law:

Competitive pressure (from upstream) pushes weight positive (toward abstraction). Absent pressure, weight is stable.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project labor process state.

Return type:

dict[str, Any]

Returns:

Base observation + labor-specific fields.

step(inputs, world)[source]

Motion law T for the labor process.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for competitive_pressure.

  • world (WorldView) – Read-only world context.

Return type:

LaborProcessDialectic

Returns:

New LaborProcessDialectic with updated weight and tick.

type_tag: str
class babylon.engine.dialectics.ProductionDialectic(**data)[source]

Bases: Dialectic[DepartmentRow, EmptyPole]

The labor process ↔ valorization process contradiction (V1 Ch7§2).

Ch7§2: “The production of surplus-value is the differentia specifica of capitalist production.” The labor process (creating use-values) is subordinated to the valorization process (creating surplus-value).

Weight semantics:

weight < 0 → labor process dominant (A): production for use. weight > 0 → valorization dominant (B): production for profit.

observe() returns the value tensor [l, c, v, s, r]:

l = v + s (living labor / new value added) c = constant capital transferred v = variable capital (value of labor-power) s = surplus-value r = s/v (rate of exploitation)

Parameters:
invariants()[source]

Production-specific invariants.

Checks:
  • Surplus value ≥ 0.

Return type:

list[str]

Returns:

List of violation descriptions.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project the value tensor [l, c, v, s, r] + labor pool.

Ch8: Total value = c + v + s = c + l, where l = v + s.

Return type:

dict[str, Any]

Returns:

Value tensor components, OCC, and labor pool contribution.

step(inputs, world)[source]

Motion law T for the production contradiction.

Higher exploitation rates push weight positive (toward valorization). Uses upstream input if available, otherwise falls back to internal state.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for rate_of_exploitation.

  • world (WorldView) – Read-only world context.

Return type:

ProductionDialectic

Returns:

New ProductionDialectic with updated weight and tick.

type_tag: str
class babylon.engine.dialectics.WageDialectic(**data)[source]

Bases: Dialectic[ValueOfLaborPower, PriceOfLaborPower]

The value ↔ price of labor-power contradiction (V1 Ch19-22).

Ch19: The daily price of labour-power does not coincide with its daily value. The wage mystifies the relation by concealing the division between necessary and surplus labor.

Weight semantics:
weight < 0 → tight labor market (“buy” market for labor-power).

Workers have bargaining power, W approaches V.

weight > 0 → loose labor market (“sell” market for labor-power).

Reserve army is large, W falls below V.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project wage state for downstream consumption.

Return type:

dict[str, Any]

Returns:

Base observation + wage-specific fields.

step(inputs, world)[source]

Motion law T for the wage contradiction.

Reserve army pressure (from AccumulationDialectic) pushes weight positive (toward sell market / depressed wages).

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for reserve_army_pressure.

  • world (WorldView) – Read-only world context.

Return type:

WageDialectic

Returns:

New WageDialectic with updated weight and tick.

type_tag: str
class babylon.engine.dialectics.ValueOfLaborPower(**data)[source]

Bases: BaseModel

Value of labor-power: cost to reproduce the worker (V1 Ch6).

Ch6: “The value of labour-power is determined by the value of the necessaries of life habitually required by the average labourer.”

Parameters:
  • reproduction_cost (float)

  • subsistence_hours (float)

  • historical_moral_element (float)

reproduction_cost

Total value needed to reproduce labor-power.

subsistence_hours

Labor-hours of the necessaries of life.

historical_moral_element

The “historical and moral element” that varies by country and epoch (Ch6). ∈ [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

reproduction_cost: float
subsistence_hours: float
historical_moral_element: float
class babylon.engine.dialectics.PriceOfLaborPower(**data)[source]

Bases: BaseModel

Price of labor-power: the wage actually paid (V1 Ch19).

Ch19: “What the labourer sells is not directly his labour, but his labour-power.” The price (wage) may differ from the value.

Parameters:
nominal_wage

Money wage paid.

real_wage

Wage in terms of purchasing power.

relative_wage

Share of total product going to labor ∈ [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

nominal_wage: float
real_wage: float
relative_wage: float
class babylon.engine.dialectics.AccumulationDialectic(**data)[source]

Bases: Dialectic[ConcentrationOfCapital, ReserveArmyExpansion]

Concentration of capital ↔ reserve army expansion (V1 Ch25).

Ch25§1: “accumulation of capital is… accompanied by… a relatively redundant population of labourers.” Rising OCC displaces workers, while accumulation itself creates demand.

Weight semantics:
weight < 0 → concentration dominant (A): capital expanding,

absorbing labor (prosperity phase).

weight > 0 → reserve army dominant (B): labor displacement,

rising unemployment (crisis phase).

Morphism inputs:

Receives rate_of_exploitation, occ, labor_hours_contributed from ProductionDialectic. Receives colonial_extraction from PrimitiveAccumulationDialectic.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project accumulation state for downstream consumption.

Emits reserve_army_pressure for WageDialectic and total_labor_pool for macro aggregation.

Return type:

dict[str, Any]

Returns:

Base observation + accumulation-specific fields.

step(inputs, world)[source]

Motion law T for the accumulation contradiction.

Rising OCC from upstream Production shifts weight positive (toward reserve army expansion).

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for occ.

  • world (WorldView) – Read-only world context.

Return type:

AccumulationDialectic

Returns:

New AccumulationDialectic with updated weight and tick.

type_tag: str
class babylon.engine.dialectics.ConcentrationOfCapital(**data)[source]

Bases: BaseModel

Concentration of capital via reinvestment of surplus (V1 Ch25§1).

Ch24: “Accumulate, accumulate! That is Moses and the prophets!”

Parameters:
  • total_capital (float)

  • reinvestment_rate (float)

  • fixed_capital (float)

  • centralization_index (float)

total_capital

Total capital stock (c + v).

reinvestment_rate

Fraction of surplus reinvested ∈ [0, 1].

fixed_capital

Capital tied up in instruments/machinery.

centralization_index

Degree of capital centralization ∈ [0, 1]. Distinct from concentration: centralization is merger and acquisition, concentration is growth from reinvestment.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

total_capital: float
reinvestment_rate: float
fixed_capital: float
centralization_index: float
class babylon.engine.dialectics.ReserveArmyExpansion(**data)[source]

Bases: BaseModel

Industrial reserve army produced by accumulation (V1 Ch25§3).

Ch25: “The greater the social wealth… the greater is the industrial reserve army… The more extensive, finally, the lazarus-layers… the greater is official pauperism.”

Parameters:
  • unemployed_fraction (float)

  • wage_pressure (float)

  • absorption_rate (float)

  • total_labor_pool (float)

unemployed_fraction

Fraction of labor force unemployed ∈ [0, 1].

wage_pressure

Downward pressure on wages from reserve army. Negative = tight market (upward pressure on wages).

absorption_rate

Rate at which reserve army is absorbed.

total_labor_pool

Total available labor-hours in the economy.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

unemployed_fraction: float
wage_pressure: float
absorption_rate: float
total_labor_pool: float
class babylon.engine.dialectics.PrimitiveAccumulationDialectic(**data)[source]

Bases: Dialectic[ColonialExpropriation, SettlerFormation]

Colonial expropriation ↔ settler formation (V1 Ch26-33 + Sakai).

The settler-colonial reframing of Marx’s primitive accumulation. Not “dispossession creates proletarians” but “dispossession of colonized peoples creates and sustains a settler class bribed by the spoils” (Sakai, MIM(P), Du Bois).

Weight semantics:
weight < 0 → A dominant: raw colonial violence is primary.

Frontier wars, active genocide, visible extraction.

weight > 0 → B dominant: settler formation is mature.

The bribe is institutionalized, violence structural. “Law and order” replaces open warfare.

Morphism outputs:

colonial_extraction → AccumulationDialectic (capital stock). imperial_rent_generated → WageDialectic (super-wages).

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project settler-colonial state for downstream consumption.

Emits colonial_extraction for AccumulationDialectic and imperial_rent_generated for WageDialectic.

Return type:

dict[str, Any]

Returns:

Base observation + settler-colonial fields.

step(inputs, world)[source]

Motion law T for primitive accumulation.

Extraction boost (from upstream) shifts weight. Without input, weight is stable.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for extraction_boost.

  • world (WorldView) – Read-only world context.

Return type:

PrimitiveAccumulationDialectic

Returns:

New PrimitiveAccumulationDialectic with updated weight.

type_tag: str
class babylon.engine.dialectics.ColonialExpropriation(**data)[source]

Bases: BaseModel

Active process of dispossessing colonized peoples (V1 Ch26-27, Ch31).

Ch31: “The treasures captured outside Europe by undisguised looting, enslavement, and murder, floated back to the mother-country and were there turned into capital.”

Following Sakai (Settlers) and MIM(P), this is not merely historical but an ongoing process: gentrification, mass incarceration (Ch28’s “bloody legislation” for the 13th Amendment), ICE raids, etc.

Parameters:
  • expropriation_rate (float)

  • colonial_extraction (float)

  • land_theft (float)

  • super_exploitation_rate (float)

expropriation_rate

Rate of ongoing dispossession ∈ [0, 1].

colonial_extraction

Value extracted via extra-economic coercion.

land_theft

Fraction of indigenous/colonized land enclosed ∈ [0, 1].

super_exploitation_rate

Degree colonized workers are paid below the value of their labor-power (W_opc < V_opc).

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

expropriation_rate: float
colonial_extraction: float
land_theft: float
super_exploitation_rate: float
class babylon.engine.dialectics.SettlerFormation(**data)[source]

Bases: BaseModel

Creation and maintenance of the settler nation (Sakai, MIM(P)).

Sakai: The white working class is not a proletariat — it is a settler nation. Their material interests are tied to the colonial project. Du Bois/Roediger: “The wages of whiteness.”

MIM(P): First World “workers” are net exploiters when Wc/Vc > 1.

Parameters:
  • settler_share (float)

  • labor_aristocracy_ratio (float)

  • settler_identity (float)

  • immiseration_resistance (float)

settler_share

Fraction of colonial surplus distributed as imperial rent (super-wages, land, state services) ∈ [0, 1].

labor_aristocracy_ratio

Wc/Vc for settler workers. > 1.0 means they consume more than they produce = labor aristocracy.

settler_identity

Degree of identification with colonial project vs. recognition of shared class interest ∈ [0, 1].

immiseration_resistance

How resistant settlers are to actual proletarianization ∈ [0, 1]. High when bribe flows.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

settler_share: float
labor_aristocracy_ratio: float
settler_identity: float
immiseration_resistance: float
class babylon.engine.dialectics.CirculationDialectic(**data)[source]

Bases: Dialectic[CircuitState, EmptyPole]

Circuit of capital dialectic.

Pole A holds the CircuitState tracking Money, Productive, and Commodity capital. Motion law feeds inputs through advance_circuit.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project circulation state for downstream dialectics.

Emits: - total_capital: M + P + C’ aggregate. - realized_money: money-capital = realized money from sales. - commodity_overhang: unsold commodity fraction.

Return type:

dict[str, Any]

Returns:

Base observation extended with circulation outputs.

step(inputs, world)[source]

Motion law T for the circuit of capital.

Parameters:
  • inputs (TickInputs) – Upstream outputs with elapsed_days, surplus_value, and optional profile_dict.

  • world (WorldView) – Read-only world context.

Return type:

CirculationDialectic

Returns:

New CirculationDialectic with updated circuit state.

sublate()[source]

Sublate to Realization Crisis if commodity overhang exceeds threshold.

Return type:

Dialectic[Any, Any] | None

Returns:

RealizationCrisisDialectic if overhanging, else None.

type_tag: str
class babylon.engine.dialectics.TurnoverDialectic(**data)[source]

Bases: Dialectic[TurnoverProfile, AnnualSurplusValue]

Turnover cycle dialectic.

Pole A is TurnoverProfile (durations). Pole B is AnnualSurplusValue (computed turnover-adjusted rates).

Parameters:
  • id (UUID)

  • type_tag (str)

  • pole_a (TurnoverProfile)

  • pole_b (AnnualSurplusValue)

  • weight (Annotated[float, Ge(ge=-1.0), Le(le=1.0)])

  • parent_id (UUID | None)

  • tick_created (int)

  • tick_updated (int)

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project turnover state.

Return type:

dict[str, Any]

Returns:

Base observation + annual surplus value metrics.

step(inputs, world)[source]

Motion law T for turnover dynamics.

Parameters:
  • inputs (TickInputs) – Upstream outputs with v and s values.

  • world (WorldView) – Read-only world context.

Return type:

TurnoverDialectic

Returns:

New TurnoverDialectic with updated annual surplus value.

type_tag: str
class babylon.engine.dialectics.ReproductionDialectic(**data)[source]

Bases: Dialectic[DepartmentRow, DepartmentRow]

Department I ↔ Department II contradiction.

Pole A handles Dept I (Means of Production). Pole B handles Dept II (Means of Consumption). Weight maps to the gap returned by check_simple_reproduction.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

step(inputs, world)[source]

Motion law T for reproduction balance.

Parameters:
  • inputs (TickInputs) – Upstream outputs (currently unused — poles hold totals).

  • world (WorldView) – Read-only world context.

Return type:

ReproductionDialectic

Returns:

New ReproductionDialectic with updated weight.

sublate()[source]

Sublate to DisproportionalityCrisis when imbalance is extreme.

Return type:

Dialectic[Any, Any] | None

Returns:

DisproportionalityCrisisDialectic if |weight| >= 0.8, else None.

type_tag: str
class babylon.engine.dialectics.DistributionDialectic(**data)[source]

Bases: Dialectic[Wages, SurplusShares]

Wages ↔ SurplusShares distribution (Grundrisse moment).

Weight semantics:

weight < 0 → wages dominate surplus claims. weight > 0 → surplus claims squeeze wages (profit squeeze).

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project distribution state for downstream dialectics.

Emits: - wages_paid: total wages from pole A (→ Consumption) - surplus_distributed: total surplus from pole B (→ Consumption)

Return type:

dict[str, Any]

Returns:

Base observation extended with distribution outputs.

step(inputs, world)[source]

Motion law T for distribution dynamics.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for profit_squeeze events.

  • world (WorldView) – Read-only world context.

Return type:

DistributionDialectic

Returns:

New DistributionDialectic with updated weight.

type_tag: str
class babylon.engine.dialectics.Wages(**data)[source]

Bases: BaseModel

Wage component of distribution.

Parameters:

wages_paid (float)

wages_paid

Total wages paid in the distribution round.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

wages_paid: float
class babylon.engine.dialectics.SurplusShares(**data)[source]

Bases: BaseModel

Surplus shares distributed among claimants.

Parameters:
profit_distributed

Profit of enterprise distributed.

interest_paid

Interest on borrowed capital.

rent_paid

Ground rent paid to landowners.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

profit_distributed: float
interest_paid: float
rent_paid: float
class babylon.engine.dialectics.ConsumptionDialectic(**data)[source]

Bases: Dialectic[ProductiveConsumption, IndividualConsumption]

Productive ↔ Individual consumption (Grundrisse moment).

Weight semantics:

weight < 0 → productive consumption dominant (accumulation). weight > 0 → individual consumption dominant (reproduction).

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project consumption state for downstream dialectics.

Emits the two renewal outputs that close the Grundrisse cycle: - mp_renewed: means of production consumed (→ Production) - labor_power_renewed: labor-power reproduced (→ Production)

Return type:

dict[str, Any]

Returns:

Base observation extended with renewal outputs.

step(inputs, world)[source]

Motion law T for consumption dynamics.

Parameters:
  • inputs (TickInputs) – Upstream outputs (currently unused).

  • world (WorldView) – Read-only world context.

Return type:

ConsumptionDialectic

Returns:

New ConsumptionDialectic with updated tick.

type_tag: str
class babylon.engine.dialectics.ProductiveConsumption(**data)[source]

Bases: BaseModel

Productive consumption: means of production consumed in production.

Parameters:

means_of_production_value (float)

means_of_production_value

Value of means of production consumed.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

means_of_production_value: float
class babylon.engine.dialectics.IndividualConsumption(**data)[source]

Bases: BaseModel

Individual consumption: reproduction of labor-power.

Parameters:

labor_power_reproduced (float)

labor_power_reproduced

Value of labor-power reproduced.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

labor_power_reproduced: float
class babylon.engine.dialectics.SurplusDistributionDialectic(**data)[source]

Bases: Dialectic[SurplusDistributionPole, EmptyPole]

Surplus Value Distribution — s = p + i + r + t.

Named “Distribution” rather than “Transformation” to distinguish this from the value → price transformation problem (V3 Ch9-10), which is out of scope (spec 024, Assumptions). This dialectic models how total surplus decomposes into competing revenue claims.

Pole A stores the s = p + i + r + t decomposition. Weight tracks the share of surplus retained by industrial capital (enterprise profit) versus claims by money-capital (interest), landed capital (rent), and the state (taxes).

Weight semantics:

< 0: Enterprise profit dominates (healthy accumulation). > 0: Claimants dominate (profit squeeze / debt spiral).

Motion law:

Reads upstream interest rate changes and recomputes the distribution. Weight shifts toward +1 as claims crowd out enterprise profit.

Sublation:

When claims_exceed_surplus is True, sublates to DebtSpiralCrisisDialectic.

Parameters:
invariants()[source]

Verify accounting identity: s = p + i + r + t.

Return type:

list[str]

Returns:

List of violation descriptions.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project surplus distribution state.

Return type:

dict[str, Any]

Returns:

Observation dict with s, p, i, r, t components.

step(inputs, world)[source]

Motion law T for surplus value distribution.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for own id’s entry with interest_rate_increase (float).

  • world (WorldView) – Read-only world context.

Return type:

SurplusDistributionDialectic

Returns:

New SurplusDistributionDialectic with updated weight and poles.

sublate()[source]

Sublate to debt spiral when claims exceed surplus (FR-016).

Return type:

Dialectic[Any, Any] | None

Returns:

DebtSpiralCrisisDialectic if claims exceed surplus, else None.

type_tag: str
class babylon.engine.dialectics.SurplusDistributionPole(**data)[source]

Bases: BaseModel

Pole A for the Distribution dialectic.

Reimplements the surplus value distribution identity from economics.distribution.SurplusValueDistribution for the dialectic layer. The formula p = s - i - r - t is identical to SurplusValueDistribution.profit_of_enterprise. This is intentional: the dialectic receives pre-computed distribution inputs and does not perform data-source lookups.

See also

babylon.economics.distribution.types.SurplusValueDistribution

Parameters:
total_surplus

Total surplus value produced (s).

interest_payments

Interest claim on surplus (i).

ground_rent

Ground rent claim on surplus (r).

taxes

Tax claim on surplus (t).

property claims_exceed_surplus: bool

Whether claims exceed total surplus (FR-016).

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property profit_of_enterprise: float

p = s - i - r - t.

Type:

Residual

total_surplus: float
interest_payments: float
ground_rent: float
taxes: float
class babylon.engine.dialectics.TRPFDialectic(**data)[source]

Bases: Dialectic[ProfitRateState, CounterTendencyStrength]

Tendency of the Rate of Profit to Fall ↔ Counteracting Tendencies.

Pole A holds the tendency (profit rate trajectory). Pole B holds the counter-tendency vector from economics.counter_tendencies.

Weight semantics:

< 0: TRPF dominating (profit rate falling, counter-tendencies weak). > 0: Counter-tendencies dominating (profit rate sustained).

Motion law:

Reads upstream OCC and exploitation rate changes, delegates to CounterTendencyStrength.net_counter_tendency for weight.

No sublation: TRPF is a structural tendency, not an event.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project TRPF state for downstream consumers.

Return type:

dict[str, Any]

Returns:

Observation dict with profit rate, OCC, net counter-tendency.

step(inputs, world)[source]

Motion law T for TRPF dynamics.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for occ, exploitation_rate.

  • world (WorldView) – Read-only world context.

Return type:

TRPFDialectic

Returns:

New TRPFDialectic with updated weight and poles.

type_tag: str
class babylon.engine.dialectics.ProfitRateState(**data)[source]

Bases: BaseModel

Pole A for the TRPF dialectic.

Parameters:
  • profit_rate (float)

  • profit_rate_trend (float)

  • organic_composition (float)

profit_rate

Current average rate of profit.

profit_rate_trend

Year-over-year change in profit rate.

organic_composition

c/v ratio (OCC).

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

profit_rate: float
profit_rate_trend: float
organic_composition: float
class babylon.engine.dialectics.CreditDialectic(**data)[source]

Bases: Dialectic[CreditPole, FictitiousCapitalStock]

Real Capital ↔ Fictitious Capital.

Pole A holds the real capital stock and industrial profit rate. Pole B holds the accumulated fictitious capital claims via the FictitiousCapitalStock from economics.credit.types.

Weight semantics:

< 0: Real capital dominates (healthy production). > 0: Fictitious capital dominates (financialization).

Motion law:

Reads upstream credit growth and default rates. Weight tracks the financialization index mapped to [-1, 1].

Sublation:

When financialization index exceeds FINANCIALIZATION_BUBBLE (3.5), sublates to FinancialCrisisDialectic.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project credit system state.

Return type:

dict[str, Any]

Returns:

Observation dict with financialization index, total claims, profit rate.

step(inputs, world)[source]

Motion law T for credit dynamics.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for credit_growth, default_rate.

  • world (WorldView) – Read-only world context.

Return type:

CreditDialectic

Returns:

New CreditDialectic with updated fictitious capital and weight.

sublate()[source]

Sublate to financial crisis when overaccumulation exceeds threshold.

Return type:

Dialectic[Any, Any] | None

Returns:

FinancialCrisisDialectic if financialization > BUBBLE threshold.

type_tag: str
class babylon.engine.dialectics.CreditPole(**data)[source]

Bases: BaseModel

Pole A for the Credit dialectic — real capital side.

Parameters:
total_real_capital

Accumulated real capital stock K.

profit_rate

Industrial profit rate.

gdp

Real GDP for financialization ratio computation.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

total_real_capital: float
profit_rate: float
gdp: float
class babylon.engine.dialectics.RentDialectic(**data)[source]

Bases: Dialectic[RentPole, EmptyPole]

Ground Rent extraction — Absolute ↔ Differential.

Pole A holds the three-category rent decomposition (agricultural, resource, urban) from economics.rent.types.

Weight semantics:

< 0: Rent is a minor claims category (small rentier share). > 0: Rent dominates surplus distribution (rentier economy).

Motion law:

Reads upstream total_surplus to compute rentier share. Weight = 2 * (rent_share) - 1, clamped to [-1, 1].

Parameters:
invariants()[source]

Verify rent components are non-negative.

Return type:

list[str]

Returns:

List of violation descriptions.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project rent extraction state.

Return type:

dict[str, Any]

Returns:

Observation dict with rent categories and total.

step(inputs, world)[source]

Motion law T for rent dynamics.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for total_surplus.

  • world (WorldView) – Read-only world context.

Return type:

RentDialectic

Returns:

New RentDialectic with updated weight.

type_tag: str
class babylon.engine.dialectics.RentPole(**data)[source]

Bases: BaseModel

Pole A for the Rent dialectic — three-category decomposition.

Reimplements the three-category rent aggregation from economics.rent.types.RentExtraction. The formula total_rent = agri + resource + urban is identical. This is intentional: the dialectic receives pre-aggregated county-level data and does not perform data-source lookups.

See also

babylon.economics.rent.types.RentExtraction

Parameters:
agricultural_rent

Rent from farming / rural land.

resource_rent

Rent from extractive industries.

urban_rent

Rent from urban / building-site monopoly.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property total_rent: float

Total ground rent across all categories.

agricultural_rent: float
resource_rent: float
urban_rent: float
class babylon.engine.dialectics.ImperialDialectic(**data)[source]

Bases: Dialectic[CoreEconomy, PeripheryEconomy]

Core ↔ Periphery — the Fundamental Theorem of MLM-TW.

Pole A is the imperialist core. Pole B is the exploited periphery. Imperial Rent Phi is now computed structurally from the production chain.

Weight semantics:

< 0: Core extracts freely (labor aristocracy bribed, periphery suppressed). > 0: Periphery resists (decolonization, rising consciousness).

Motion law:

Reads upstream matrix updates (DecomposedFlow) and computes rent structurally via ProductionChainRentCalculator, or falls back to scalar defaults. Weight derived from deviation of LAR from unity.

Invariant:

Imperial rent Phi >= 0 (core always extracts from periphery).

Parameters:
invariants()[source]

Verify invariants.

Return type:

list[str]

Returns:

List of violation descriptions.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project imperial rent state.

Return type:

dict[str, Any]

Returns:

Observation dict with Phi, LAR, extraction parameters.

step(inputs, world)[source]

Motion law T for imperial dynamics.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for extraction_boost.

  • world (WorldView) – Read-only world context.

Return type:

ImperialDialectic

Returns:

New ImperialDialectic with updated poles and weight.

type_tag: str
class babylon.engine.dialectics.CoreEconomy(**data)[source]

Bases: BaseModel

Pole A for the Imperial dialectic — core / imperialist side.

Parameters:
core_wages

Wages paid to core workers (Wc).

value_produced

Value produced by core workers (Vc).

profit_rate

Core industrial profit rate.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

core_wages: float
value_produced: float
profit_rate: float
class babylon.engine.dialectics.PeripheryEconomy(**data)[source]

Bases: BaseModel

Pole B for the Imperial dialectic — periphery / exploited side.

Parameters:
  • periphery_wages_ratio (float)

  • extraction_rate (float)

  • consciousness (float)

periphery_wages_ratio

w_core / w_periphery ratio.

extraction_rate

Imperial extraction efficiency alpha [0, 1].

consciousness

Periphery resistance level Psi_p [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

periphery_wages_ratio: float
extraction_rate: float
consciousness: float
class babylon.engine.dialectics.ClassConsciousnessDialectic(**data)[source]

Bases: Dialectic[MaterialConditionsBuffer, TernaryConsciousness]

The reified/spontaneous ↔ imputed/revolutionary contradiction.

Weight reflects whether consciousness is dominated by immediate, reified material conditions (wage struggles, imperial bribery) (weight < 0, A dominant) or by imputed, revolutionary consciousness organized by a vanguard (weight > 0, B dominant).

Motion law:
  • Crises/Cracks in Hegemony: Inputs from economic dialectics generate agitation, which acts to push consciousness out of equilibrium.

  • Vanguard Intervention: Education and solidarity route raw agitation into (Δr, Δl, Δf) TernaryConsciousness shifts.

  • Weight tracks the relative dominance of the ternary simplex over the base reification buffer.

Invariants:
  • r + l + f ≈ 1.0 (simplex constraint)

Parameters:
invariants()[source]

Consciousness-specific invariants.

Checks:
  • r + l + f ≈ 1.0

Return type:

list[str]

Returns:

List of violation descriptions.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project class consciousness state for frontend rendering.

Return type:

dict[str, Any]

Returns:

Observation dict with consciousness metrics.

step(inputs, world)[source]

Motion law T for class consciousness.

Calculates inputs from upstream economic crises, routes agitation into the ternary simplex, and evaluates the new weight of the dialectic.

Parameters:
  • inputs (TickInputs) – Upstream outputs. Looks for own id’s entry with added_agitation, solidarity, education_pressure.

  • world (WorldView) – Read-only world context.

Return type:

ClassConsciousnessDialectic

Returns:

New ClassConsciousnessDialectic with updated weight, poles, and tick.

type_tag: str
class babylon.engine.dialectics.ClassDialectic(**data)[source]

Bases: Dialectic[InItself, ForItself]

In-Itself ↔ For-Itself class consciousness contradiction.

Weight semantics:

weight < 0 → in-itself dominant (fragmented, passive). weight > 0 → for-itself dominant (organized, active).

Motion law:

Material grievances push weight positive. Organization level amplifies the shift. When a successor (PartyDialectic) exists, motion is governed by the party’s directive.

Sublation:

Uses SublationRule — when weight >= 0.7, sublates to PartyDialectic.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project class state for downstream consumption.

Return type:

dict[str, Any]

Returns:

Base observation extended with class-specific metrics.

step(inputs, world)[source]

Motion law T for class dialectic.

If a successor (PartyDialectic) exists in the world view, the class’s evolution is governed by the party’s directive. Otherwise, evolution follows raw material conditions.

Parameters:
Return type:

ClassDialectic

Returns:

New ClassDialectic with updated weight and tick.

sublate()[source]

Sublate to PartyDialectic when weight >= threshold.

Delegates to the SublationRule abstraction. The class produces the party. From that point on, the party governs the class.

Return type:

Dialectic[Any, Any] | None

Returns:

PartyDialectic if threshold crossed, else None.

type_tag: str
class babylon.engine.dialectics.InItself(**data)[source]

Bases: BaseModel

Class-in-itself: objective material position.

Parameters:

material_grievance (float)

material_grievance

Intensity of material deprivation ∈ [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

material_grievance: float
class babylon.engine.dialectics.ForItself(**data)[source]

Bases: BaseModel

Class-for-itself: collective self-consciousness and organization.

Parameters:

organization_level (float)

organization_level

Degree of class organization ∈ [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

organization_level: float
class babylon.engine.dialectics.PartyDialectic(**data)[source]

Bases: Dialectic[Vanguard, MassLine]

Vanguard ↔ Mass Line party contradiction.

Weight semantics:

weight < 0 → vanguard dominant (risk of bureaucratic degeneration). weight > 0 → mass line dominant (risk of spontaneism). weight ≈ 0 → healthy dialectical balance.

Motion law:

Reads the sublated class’s state to calibrate the directive. Discipline decays without class struggle input; mass support grows with material grievance.

observe() emits:
  • current_directive: float ∈ [-1, 1], a governance signal that the sublated ClassDialectic reads via find_successor().

  • discipline: vanguard discipline level.

  • mass_support: mass line support level.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project party state for downstream governance.

Emits current_directive — the governance signal that the sublated ClassDialectic reads in its step().

Return type:

dict[str, Any]

Returns:

Base observation extended with party-specific metrics.

step(inputs, world)[source]

Motion law T for the party dialectic.

Parameters:
Return type:

PartyDialectic

Returns:

New PartyDialectic with updated weight and tick.

type_tag: str
class babylon.engine.dialectics.Vanguard(**data)[source]

Bases: BaseModel

Vanguard pole: organizational discipline and theoretical clarity.

Parameters:

discipline (float)

discipline

Party discipline level ∈ [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

discipline: float
class babylon.engine.dialectics.MassLine(**data)[source]

Bases: BaseModel

Mass Line pole: connection to and support from the masses.

Parameters:

support (float)

support

Popular support level ∈ [0, 1].

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

support: float
class babylon.engine.dialectics.TransformationDialectic(**data)[source]

Bases: Dialectic[TransformationPole, EmptyPole]

Value → Price of Production transformation (V3 Ch9-10).

This dialectic mediates between the V1 world of labor-values and the V3 world of production prices. It reads upstream production dialectics to compute the economy-wide average profit rate, then makes that rate available as an observation frame.

Weight semantics:

weight < 0 → values dominate prices (low equalization). weight > 0 → prices of production fully equalized.

observe() emits:
  • average_profit_rate: r̄ = Σs / Σ(c+v)

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

observe()[source]

Project transformation state.

Return type:

dict[str, Any]

Returns:

Base observation extended with average_profit_rate.

step(inputs, world)[source]

Motion law T: recompute average profit rate from upstream.

Reads aggregate c, v, s from upstream production dialectics and computes r̄ = Σs / Σ(c+v).

Parameters:
  • inputs (TickInputs) – Upstream outputs with rate_of_exploitation and occ.

  • world (WorldView) – Read-only world context.

Return type:

TransformationDialectic

Returns:

New TransformationDialectic with updated profit rate.

type_tag: str
class babylon.engine.dialectics.TransformationPole(**data)[source]

Bases: BaseModel

Average profit rate computed from aggregate production data.

Parameters:

average_profit_rate (float)

average_profit_rate

Economy-wide average rate of profit r̄. Computed as: total_surplus / total_cost_price across all sectors.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

average_profit_rate: float
class babylon.engine.dialectics.RealizationCrisisDialectic(**data)[source]

Bases: Dialectic[EmptyPole, EmptyPole]

Triggered when CirculationDialectic sublates due to realization failure.

Commodity capital cannot be reconverted to money capital because commodities cannot find buyers at their value.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

step(inputs, world)[source]

Crisis persistence — realization crisis deepens.

Parameters:
  • inputs (TickInputs) – Upstream outputs (currently unused).

  • world (WorldView) – Read-only world context.

Return type:

RealizationCrisisDialectic

Returns:

Updated crisis dialectic with new tick.

type_tag: str
class babylon.engine.dialectics.DisproportionalityCrisisDialectic(**data)[source]

Bases: Dialectic[EmptyPole, EmptyPole]

Triggered when ReproductionDialectic sublates due to departmental imbalance.

Department I and Department II fail to maintain the exchange relation I(v+s) = IIc required for simple reproduction.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

step(inputs, world)[source]

Crisis persistence — disproportionality deepens.

Parameters:
  • inputs (TickInputs) – Upstream outputs (currently unused).

  • world (WorldView) – Read-only world context.

Return type:

DisproportionalityCrisisDialectic

Returns:

Updated crisis dialectic with new tick.

type_tag: str
class babylon.engine.dialectics.DebtSpiralCrisisDialectic(**data)[source]

Bases: Dialectic[EmptyPole, EmptyPole]

Crisis dialectic produced when financial claims exceed surplus.

Produced by SurplusDistributionDialectic.sublate() when interest + rent + taxes > total surplus (FR-016).

The debt spiral is self-reinforcing: unpaid interest accrues as new debt, which increases interest obligations, which further exceeds surplus. Resolution requires either devaluation of claims (crisis/default) or dramatic increase in surplus (impossible under TRPF conditions).

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

step(_inputs, world)[source]

Crisis persistence — debt spiral deepens or resolves.

Parameters:
  • _inputs (TickInputs) – Upstream outputs (currently unused).

  • world (WorldView) – Read-only world context.

Return type:

DebtSpiralCrisisDialectic

Returns:

Updated crisis dialectic with new tick.

type_tag: str
class babylon.engine.dialectics.FinancialCrisisDialectic(**data)[source]

Bases: Dialectic[EmptyPole, EmptyPole]

Crisis dialectic produced when fictitious capital overaccumulates.

Produced by CreditDialectic.sublate() when the financialization index exceeds FINANCIALIZATION_BUBBLE (3.5).

Marx’s insight: crisis appears as a money/credit crisis but the underlying cause is overproduction relative to profitable realization. The credit system delays but ultimately amplifies crisis.

Parameters:
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

step(_inputs, world)[source]

Crisis persistence — financial crisis deepens or resolves.

Parameters:
  • _inputs (TickInputs) – Upstream outputs (currently unused).

  • world (WorldView) – Read-only world context.

Return type:

FinancialCrisisDialectic

Returns:

Updated crisis dialectic with new tick.

type_tag: str

Modules

accumulation

AccumulationDialectic — ConcentrationOfCapital ↔ ReserveArmyExpansion (V1 Ch23-25).

base

Dialectic[A, B] — the fundamental primitive of Babylon v2.

circulation

CirculationDialectic — Circuit of Capital (V2 Ch1-4).

class_struggle

ClassDialectic — In-Itself ↔ For-Itself (Lukacs, Marx).

commodity

CommodityDialectic — Use-Value ↔ Exchange-Value (V1 Ch1).

consciousness

Class Consciousness Dialectics (Lukacs, MIM(P)).

consumption

ConsumptionDialectic — ProductiveConsumption ↔ IndividualConsumption (Grundrisse).

credit

CreditDialectic — Real Capital ↔ Fictitious Capital (V3 Ch21-33).

crises

Crisis Sublation Dialectics — consolidated crisis types.

distribution

DistributionDialectic — Wages ↔ SurplusShares (Grundrisse moment).

imperial

ImperialDialectic — Core ↔ Periphery (V3 Ch14 §V + MLM-TW).

invariants_v2

Universal and per-type invariant checking for the v2 engine.

labor_process

LaborProcessDialectic — ConcreteLabor ↔ AbstractLabor (V1 Ch7§1).

party

PartyDialectic — Vanguard ↔ Mass Line (MLM theory).

primitive_accumulation

PrimitiveAccumulationDialectic — ColonialExpropriation ↔ SettlerFormation.

production

ProductionDialectic — LaborProcess ↔ Valorization (V1 Ch7§2, Ch8, Ch9).

registry

Type registry for Dialectic subclass deserialization.

rent

RentDialectic — Ground Rent extraction (V3 Ch37-47).

reproduction

ReproductionDialectic — Department I ↔ Department II (V2 Ch20-21).

sublation

SublationRule — composable Aufhebung lifecycle abstraction.

surplus_distribution

SurplusDistributionDialectic — s = p + i + r + t (V3 Ch9-10).

tick

Pure tick function for the v2 dialectical engine.

transformation

TransformationDialectic — Value → Price of Production (V3 Ch9-10).

trpf

TRPFDialectic — Tendency of the Rate of Profit to Fall (V3 Ch13-15).

turnover

TurnoverDialectic — Turnover Cycle (V2 Part 2).

volume_1

Capital Volume I dialectics — backward-compatibility re-export shim.

volume_2

Capital Volume II dialectics — backward-compatibility re-export shim.

volume_3

Capital Volume III dialectics — backward-compatibility re-export shim.

wage

WageDialectic — ValueOfLaborPower ↔ PriceOfLaborPower (V1 Ch19-22).

world

World, Morphism, and WorldEvent — the v2 dialectical graph.