# ============================================================================
# ACT yeast self-reproduction — explicit can and can't version
#
# Applied constructor-theory case:
# A yeast starter culture is modeled as a self-reproducer.
#   - the genome is the replicator
#   - the cell machinery is the vehicle
#   - a nutrient bath supplies raw materials
#   - a fermenter provides a selection environment
#
# This example therefore includes both sides:
#   - CAN   : accurate replication, self-reproduction, heritable variation,
#             and natural selection for a digitally encoded starter lineage
#   - CAN'T : accurate self-reproduction for a contrast lineage whose heredity
#             is not digitally instantiated under no-design laws
# ============================================================================

@prefix : <http://example.org/act/yeast/> .
@prefix arc: <https://example.org/arc#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .

:case a arc:Case ;
  arc:question "Can a yeast starter culture self-reproduce accurately under no-design laws, and what exactly can't happen for a non-digital contrast lineage?" .

# --------------------------------------
# Shared world assumptions and resources
# --------------------------------------

:world :obeys :NoDesignLaws .

:dnaRegister a :DigitalInformationMedium .
:analogRegister a :NonDigitalInformationMedium .

:nutrientBath a :RawMaterialSupply .
:mutationSource a :VariationSource .

:fermenter a :SelectionEnvironment ;
  :favours :RespireFast .

# ------------------------
# Positive starter lineage
# ------------------------

:starterGenome a :Replicator ;
  :accuracy :High ;
  :variant :RespireFast ;
  :storedIn :dnaRegister .

:starterVehicle a :Vehicle ;
  :function :Metabolism ;
  :function :CopyingSupport .

:starterCell a :Cell ;
  :hasReplicator :starterGenome ;
  :hasVehicle :starterVehicle .

# ------------------------------------------
# Contrast lineage with non-digital heredity
# ------------------------------------------

:contrastGenome a :Replicator ;
  :accuracy :High ;
  :variant :RespireFast ;
  :storedIn :analogRegister .

:contrastVehicle a :Vehicle ;
  :function :Metabolism ;
  :function :CopyingSupport .

:contrastCell a :Cell ;
  :hasReplicator :contrastGenome ;
  :hasVehicle :contrastVehicle .

# -----------------------------------------------------------
# CAN rules — what is possible for the viable starter culture
# -----------------------------------------------------------

# Under no-design laws, digitally instantiated hereditary information makes
# accurate genome copying possible in principle.
{ :world :obeys :NoDesignLaws .
  ?Medium a :DigitalInformationMedium . }
=>
{ ?Medium :can :SupportReplicationUnderNoDesignLaws .
  :ReplicationUnderNoDesignLaws a :PossibleTask . } .

# A replicator stored in a digital medium can be accurately copied.
{ ?Genome a :Replicator ;
          :storedIn ?Medium .
  ?Medium :can :SupportReplicationUnderNoDesignLaws . }
=>
{ ?Genome :can :AccurateGenomeCopyUnderNoDesignLaws .
  :GenomeCopying a :PossibleTask . } .

# A replicator-plus-vehicle architecture supports accurate replication.
{ ?Genome :accuracy :High .
  ?Cell :hasReplicator ?Genome .
  ?Cell :hasVehicle ?Vehicle .
  ?Vehicle a :Vehicle . }
=>
{ ?Cell :can :AccurateReplicationArchitecture .
  :AccurateReplicationArchitecture a :PossibleTask . } .

# Genome copying plus architecture plus raw materials makes self-reproduction possible.
{ ?Cell :hasReplicator ?Genome .
  ?Genome :can :AccurateGenomeCopyUnderNoDesignLaws .
  ?Cell :can :AccurateReplicationArchitecture .
  :nutrientBath a :RawMaterialSupply . }
=>
{ ?Cell a :SelfReproducer .
  ?Cell :can :SelfReproduce .
  :SelfReproduction a :PossibleTask . } .

# Variation plus a selection environment makes natural selection possible.
{ ?Genome a :Replicator .
  :mutationSource a :VariationSource . }
=>
{ ?Genome :can :HeritableVariation .
  :HeritableVariation a :PossibleTask . } .

{ ?Cell :hasReplicator ?Genome .
  ?Cell :can :SelfReproduce .
  ?Genome :can :HeritableVariation .
  :fermenter a :SelectionEnvironment . }
=>
{ ?Cell :can :NaturalSelectionLineage .
  :NaturalSelection a :PossibleTask . } .

{ ?Cell :hasReplicator ?Genome .
  ?Cell :can :NaturalSelectionLineage .
  ?Genome :variant ?V .
  :fermenter :favours ?V . }
=>
{ ?Genome :selectedIn :fermenter . } .

# ---------------------------------------------------------------------
# CAN'T rules — what is impossible for the non-digital contrast lineage
# ---------------------------------------------------------------------

# Under no-design laws, a non-digital hereditary medium cannot support the same
# accurate genome-copying task.
{ :world :obeys :NoDesignLaws .
  ?Genome a :Replicator ;
          :storedIn ?Medium .
  ?Medium a :NonDigitalInformationMedium . }
=>
{ ?Genome :cannot :AccurateGenomeCopyUnderNoDesignLaws . } .

# If accurate genome copying is unavailable, accurate self-reproduction is unavailable.
{ ?Cell :hasReplicator ?Genome .
  ?Genome :cannot :AccurateGenomeCopyUnderNoDesignLaws . }
=>
{ ?Cell :cannot :AccurateSelfReproduction . } .

# If accurate self-reproduction is unavailable, the contrast lineage cannot support
# the same natural-selection story as the viable starter lineage.
{ ?Cell :cannot :AccurateSelfReproduction . }
=>
{ ?Cell :cannot :NaturalSelectionLineage . } .

# ------
# Checks
# ------

# Positive checks for the viable starter culture.
{ :world :obeys :NoDesignLaws . }
=> { :case :checkC1 :Passed . } .

{ :dnaRegister a :DigitalInformationMedium . }
=> { :case :checkC2 :Passed . } .

{ :starterGenome a :Replicator . }
=> { :case :checkC3 :Passed . } .

{ :starterVehicle a :Vehicle . }
=> { :case :checkC4 :Passed . } .

{ :starterGenome :can :AccurateGenomeCopyUnderNoDesignLaws . }
=> { :case :checkC5 :Passed . } .

{ :starterCell :can :AccurateReplicationArchitecture . }
=> { :case :checkC6 :Passed . } .

{ :starterCell a :SelfReproducer . }
=> { :case :checkC7 :Passed . } .

{ :starterGenome :can :HeritableVariation . }
=> { :case :checkC8 :Passed . } .

{ :starterCell :can :NaturalSelectionLineage . }
=> { :case :checkC9 :Passed . } .

{ :starterGenome :selectedIn :fermenter . }
=> { :case :checkC10 :Passed . } .

# Negative checks for the contrast lineage.
{ :contrastGenome :cannot :AccurateGenomeCopyUnderNoDesignLaws . }
=> { :case :checkC11 :Passed . } .

{ :contrastCell :cannot :AccurateSelfReproduction . }
=> { :case :checkC12 :Passed . } .

{ :contrastCell :cannot :NaturalSelectionLineage . }
=> { :case :checkC13 :Passed . } .

# ----------------
# ARC-style output
# ----------------

{ :case :checkC1 :Passed .
  :case :checkC2 :Passed .
  :case :checkC3 :Passed .
  :case :checkC4 :Passed .
  :case :checkC5 :Passed .
  :case :checkC6 :Passed .
  :case :checkC7 :Passed .
  :case :checkC8 :Passed .
  :case :checkC9 :Passed .
  :case :checkC10 :Passed .
  :case :checkC11 :Passed .
  :case :checkC12 :Passed .
  :case :checkC13 :Passed . }
=>
{
  :out log:outputString """ACT yeast self-reproduction

Answer
YES for the viable starter culture.
NO for accurate self-reproduction in the non-digital contrast lineage.

Reason Why
The starter genome is treated as a replicator storing digital hereditary information, while the cell machinery is treated as the vehicle that enables metabolism and copying support. Under no-design laws, digital information makes accurate genome copying possible. Because the replicator is accurate and paired with a vehicle, the whole starter cell qualifies as a self-reproducer. With a variation source and a selection environment, natural selection also becomes possible. By contrast, the non-digital lineage cannot support accurate genome copying under the same no-design-laws assumption, so it cannot sustain the same accurate self-reproduction or natural-selection story.

Check
C1  OK - no-design laws are assumed
C2  OK - digital information is physically instantiated for the viable lineage
C3  OK - a viable replicator is present
C4  OK - a viable vehicle is present
C5  OK - accurate genome copying is possible for the viable lineage
C6  OK - the viable lineage has a replicator-plus-vehicle architecture
C7  OK - the starter cell qualifies as a self-reproducer
C8  OK - heritable variation is possible for the viable lineage
C9  OK - the viable starter culture can support a natural-selection lineage
C10 OK - the fitter viable variant is selected in the fermenter
C11 OK - the non-digital contrast genome cannot be copied accurately under no-design laws
C12 OK - the non-digital contrast cell cannot achieve accurate self-reproduction
C13 OK - the non-digital contrast cell cannot support the same natural-selection lineage
""" .
} .
