Skip to content

Commit

Permalink
rename max_derivations to max_components
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddoret committed Aug 11, 2024
1 parent 4b26b62 commit 18e1ab1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
23 changes: 10 additions & 13 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified src/punctilious/__pycache__/axiomatic_system_1.cpython-312.pyc
Binary file not shown.
7 changes: 6 additions & 1 deletion src/punctilious/axiomatic_system_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5153,13 +5153,14 @@ def extend_with_component(t: FlexibleTheoreticalContext, c: FlexibleDerivation)
"""
t: WellFormedTheoreticalContext = coerce_theoretical_context(t=t)
c: WellFormedTheoryComponent = coerce_theory_component(d=c)
return extend_with_component(t=t, c=c)
return append_to_theory(c, t=t)


def append_to_theory(*args, t: FlexibleTheoreticalContext) -> WellFormedTheory:
"""Extend theoretical context ``t`` by appending to it whatever components are passed in *args.
TODO: REDEVELOP THIS TO SUPPORT FLEXIBLE THEORETICAL CONTEXTS
THIS IS REPLACED BY EXTEND_WITH_COMPONENT.
:param args:
:param t:
Expand Down Expand Up @@ -5199,6 +5200,10 @@ def append_to_theory(*args, t: FlexibleTheoreticalContext) -> WellFormedTheory:
extension_m: WellFormedTheorem = coerce_theorem(t=argument)
if not is_theorem_of(m=extension_m, t=t):
t: WellFormedTheory = WellFormedTheory(t=t, d=(extension_m,))
elif is_well_formed_extension(e=argument):
extension_e: WellFormedExtension = coerce_extension(e=argument)
# TODO: PRESERVE AXIOMATIZATION, ETC., HERE
t: WellFormedTheory = WellFormedTheory(t=t, d=(extension_e,))
else:
raise u1.ApplicativeError(code=c1.ERROR_CODE_AS1_049,
msg=f'Invalid argument: ({type(argument)}) {argument}.')
Expand Down

0 comments on commit 18e1ab1

Please sign in to comment.