You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseRuleApplicationError(f'The eigenvariable {eigen} cannot be free in the derivation of {application_premise.tree.conclusion}, except possibly in [{application_premise.discharge}]{to_superscript(str(application_premise.marker))}')
raiseRuleApplicationError(f'The discharge formula eigenvariable {eigen} cannot be free in the conclusion {application_premise.tree.conclusion} of the premise')
303
+
raiseRuleApplicationError(f'The eigenvariable {eigen} cannot be free in the derivation of {application_premise.tree.conclusion}')
raiseRuleApplicationError(f'The discharge formula eigenvariable {eigen} cannot be free in the conclusion {application_premise.tree.conclusion} of premise number {i}')
# If not for its invalidity, the tree would look as follows:
474
+
#
475
+
# [∃x.p₁(x)]ᵘ [p₁(y)]ᵛ
476
+
# v _______________________ ∃₋
477
+
# p₁(y)
478
+
479
+
withpytest.raises(RuleApplicationError, match=re.escape('The discharge formula eigenvariable y cannot be free in the conclusion p₁(y) of premise number 2')):
480
+
apply(
481
+
CLASSICAL_NATURAL_DEDUCTION_SYSTEM['∃₋'],
482
+
assume(u, parse_marker('u')),
483
+
premise(
484
+
tree=assume(v, parse_marker('v')),
485
+
discharge=parse_formula_with_substitution('p₁(x)[x ↦ y]', dummy_signature), # So that we can discharge it here
# If not for its invalidity, the tree would look as follows:
498
+
#
499
+
# [∀y.(p₁(y) → q₁(y))]ᵛ
500
+
# _____________________ ∀₋
501
+
# (p₁(y) → q₁(y)) [p₁(y)]ʷ
502
+
# ____________________________________ →₋
503
+
# [∃x.p₁(x)]ᵘ q₁(y)
504
+
# w ___________________________________________________ ∃₋
505
+
# q₁(y)
506
+
507
+
withpytest.raises(RuleApplicationError, match=re.escape('The discharge formula eigenvariable y cannot be free in the conclusion q₁(y) of premise number 2')):
# If not for its invalidity, the tree would look as follows:
534
+
#
535
+
# [(p₁(y) → q₁(f₀))]ᵛ [p₁(y)]ʷ
536
+
# _______________________________ →₋
537
+
# [∃x.p₁(x)]ᵘ q₁(f₀)
538
+
# w ______________________________________________ ∃₋
539
+
# q₁(f₀)
540
+
541
+
withpytest.raises(RuleApplicationError, match=re.escape('The eigenvariable y cannot be free in the derivation of q₁(f₀), except possibly in [p₁(x)[x ↦ y]]ʷ')):
542
+
apply(
543
+
CLASSICAL_NATURAL_DEDUCTION_SYSTEM['∃₋'],
544
+
assume(u, parse_marker('u')),
545
+
premise(
546
+
tree=apply(
547
+
CLASSICAL_NATURAL_DEDUCTION_SYSTEM['→₋'],
548
+
assume(v, parse_marker('v')),
549
+
assume(w, parse_marker('w')), # We avoid discharging w here
550
+
),
551
+
discharge=parse_formula_with_substitution('p₁(x)[x ↦ y]', dummy_signature), # So that we can discharge it here
\item The details of how we define the set of free variables is based on the analogous considerations for first-order logic from \cite[37]{TroelstraSchwichtenberg2000BasicProofTheory}.
648
+
\item The details of how we define the set of free variables is based on the analogous considerations for first-order logic from \cite[37]{TroelstraSchwichtenberg2000BasicProofTheory}, also implemented programmatically in the module \identifier{math.logic.deduction.proof_tree} in \cite{notebook:code}.
649
649
650
650
The type context is only here for compatibility with our peculiar definition of logical formulas.
0 commit comments