definition-interpretation (python sample)๏
See also
math concept | python declaration class | python inclusion class
This page shows how to infer new statements in a theory-derivation by applying the definition-interpretation inference-rule.
Usage๏
Call the infer_statement method from the inference-rule inclusion class listed in the i (unabridged inference_rules ) property of the theory-derivation :
u = pu.create_universe()
t = u.t()
...
# some theory derivation code
...
t.i.definition_interpretation.infer_statement(...)
Sample code๏
Code output๏
๐ซ๐พ๐ โ๐ฐโโโ ๐ป๐พ ๐บ ๐ข๐๐๐ฃ๐๐๐ ๐-๐๐-๐๐๐ ๐๐๐ข๐๐ ๐.
๐ซ๐พ๐ โ๐ฏโโ ๐ป๐พ ๐บ ๐กโ๐๐๐๐ฆ-๐๐๐๐๐ฃ๐๐ก๐๐๐ ๐๐ ๐ฐโโ.
๐๐ฒ๐ณ๐ถ๐ป๐ถ๐๐ถ๐ผ๐ป (๐ฏโ.๐ทโ): ๐ซ๐พ๐ ๐๐๐๐๐๐๐ก๐๐๐ ๐โ โ๐๐ถ๐ฎ๐ฎ๐บ ๐ฅ๐ฆ๐ง๐ช๐ฏ๐ช๐ต๐ช๐ฐ๐ฏ ๐ง๐ฐ๐ณ ๐ฅ๐ฆ๐ฎ๐ฐ๐ฏ๐ด๐ต๐ณ๐ข๐ต๐ช๐ฐ๐ฏ ๐ฑ๐ถ๐ณ๐ฑ๐ฐ๐ด๐ฆ๐ดโ ๐ป๐พ ๐๐๐ผ๐
๐๐ฝ๐พ๐ฝ (๐๐๐๐๐๐
๐บ๐๐พ๐ฝ) ๐๐ ๐ฏโ.
๐๐ป๐ณ๐ฒ๐ฟ๐ฒ๐ป๐ฐ๐ฒ ๐ฟ๐๐น๐ฒ (๐๐๐๐๐๐๐ก๐๐๐-๐๐๐ก๐๐๐๐๐๐ก๐๐ก๐๐๐): ๐ซ๐พ๐ ๐๐๐๐๐๐๐๐๐-๐๐ข๐๐ ๐๐๐๐๐๐๐ก๐๐๐-๐๐๐ก๐๐๐๐๐๐ก๐๐ก๐๐๐ ๐ฝ๐พ๐ฟ๐๐๐พ๐ฝ ๐บ๐ โ(๐, ๐ฑ, ๐ฒ โข (๐ฑ = ๐ฒ))โ ๐ป๐พ ๐๐๐ผ๐
๐๐ฝ๐พ๐ฝ ๐บ๐๐ฝ ๐ผ๐๐๐๐๐ฝ๐พ๐๐พ๐ฝ ๐๐บ๐
๐๐ฝ ๐๐ ๐ฏโ.
๐ฃ๐ฟ๐ผ๐ฝ๐ผ๐๐ถ๐๐ถ๐ผ๐ป (๐ฏโ.๐โ) - The proposition of interest: (๐โ(๐โ, ๐โ) = ๐โ(๐โ)). ๐ฃ๐ฟ๐ผ๐ผ๐ณ: โ๐๐ถ๐ฎ๐ฎ๐บ ๐ฅ๐ฆ๐ง๐ช๐ฏ๐ช๐ต๐ช๐ฐ๐ฏ ๐ง๐ฐ๐ณ ๐ฅ๐ฆ๐ฎ๐ฐ๐ฏ๐ด๐ต๐ณ๐ข๐ต๐ช๐ฐ๐ฏ ๐ฑ๐ถ๐ณ๐ฑ๐ฐ๐ด๐ฆ๐ดโ ๐๐ ๐๐๐๐๐๐
๐บ๐๐พ๐ฝ ๐ป๐ ๐ฑ๐ฒ๐ณ. (๐ทโ). ๐โ(๐โ, ๐โ) ๐๐ ๐บ๐ ๐๐๐๐พ๐๐๐๐พ๐๐บ๐๐๐๐ ๐๐ฟ ๐๐๐บ๐ ๐ฝ๐พ๐ฟ๐๐๐๐๐๐๐. ๐ณ๐๐พ๐๐พ๐ฟ๐๐๐พ, ๐ป๐ ๐๐๐พ ๐๐๐๐๐๐๐ก๐๐๐-๐๐๐ก๐๐๐๐๐๐ก๐๐ก๐๐๐ ๐๐๐ฟ๐พ๐๐พ๐๐ผ๐พ ๐๐๐
๐พ: (๐, ๐ฑ, ๐ฒ โข (๐ฑ = ๐ฒ)), ๐๐ ๐ฟ๐๐
๐
๐๐๐ ๐๐๐บ๐ (๐โ(๐โ, ๐โ) = ๐โ(๐โ)). โ
import punctilious as pu
# Create a universe-of-discourse with basic objects for the sake of this example.
u = pu.UniverseOfDiscourse(echo=True)
o1 = u.o.declare()
o2 = u.o.declare()
o3 = u.o.declare()
r1 = u.r.declare(2, signal_proposition=True)
r2 = u.r.declare(1, signal_proposition=True)
definition = u.d.declare(natural_language='Dummy definition for demonstration purposes')
# Elaborate a dummy theory with a set of propositions necessary for our demonstration
t1 = u.t(echo=True)
theory_definition = t1.include_definition(d=definition)
# And finally, use the absorption inference-rule:
proposition_of_interest = t1.i.definition_interpretation.infer_formula_statement(
d=theory_definition, x=r1(o1, o2), y=r2(o3), subtitle='The proposition of interest')
Let "U19" be a universe-of-discourse.
Let "T1" be a theory-derivation in U19.
Definition (T1.D1): Let definition D1 "Dummy definition for demonstration purposes" be included (postulated) in T1.
Inference rule (definition-interpretation): Let inference-rule definition-interpretation defined as "(D, x, y |- (x = y))" be included and considered valid in T1.
Proposition (T1.P1) - The proposition of interest: (r1(o1, o2) = r2(o3)). Proof: "Dummy definition for demonstration purposes" is postulated by def. (D1). r1(o1, o2) is an interpretation of that definition. Therefore, by the definition-interpretation inference rule: (D, x, y |- (x = y)), it follows that (r1(o1, o2) = r2(o3)). QED
Will be provided in a future version.
Will be provided in a future version.