Skip to contents

Appends an auxiliary assumption and a provenance entry. R does not change the theory in place, so assign the result.

Usage

tf_add_assumption(theory, id, statement, added_for = NULL, protects = NULL)

Arguments

theory

A theory object (named list).

id, statement

Assumption fields.

added_for

Optional id of the prediction whose anomaly the assumption was added to answer. Leave it NULL for a core assumption. tf_appraise_amendment() counts an assumption added for an anomaly as ad hoc unless a corroborated prediction it protects, new in the amended version and other than the one named in added_for, exists.

protects

Optional character vector of the ids of the predictions the assumption shields from refutation.

Value

The theory with the assumption added.

Examples

tf_theory("demo-1", "A demonstration theory") |>
  tf_add_assumption("a1", "Measurement error is negligible.")
#> $schema_version
#> [1] "1.1"
#> 
#> $id
#> [1] "demo-1"
#> 
#> $title
#> [1] "A demonstration theory"
#> 
#> $maturity
#> [1] "building"
#> 
#> $theory_form
#> [1] "network"
#> 
#> $provenance
#> $provenance[[1]]
#> $provenance[[1]]$step
#> [1] "1"
#> 
#> $provenance[[1]]$action
#> [1] "tf_theory"
#> 
#> $provenance[[1]]$detail
#> [1] "demo-1"
#> 
#> 
#> $provenance[[2]]
#> $provenance[[2]]$step
#> [1] "2"
#> 
#> $provenance[[2]]$action
#> [1] "tf_add_assumption"
#> 
#> $provenance[[2]]$detail
#> [1] "a1"
#> 
#> 
#> 
#> $auxiliary_assumptions
#> $auxiliary_assumptions[[1]]
#> $auxiliary_assumptions[[1]]$id
#> [1] "a1"
#> 
#> $auxiliary_assumptions[[1]]$statement
#> [1] "Measurement error is negligible."
#> 
#> $auxiliary_assumptions[[1]]$added_for
#> NULL
#> 
#> 
#>