logo

Theorems (or conjectures) for the theory of proveit.logic.booleans.implication

In [1]:
import proveit
# Prepare this notebook for defining the theorems of a theory:
%theorems_notebook # Keep this at the top following 'import proveit'.
from proveit.logic import Equals, NotEquals,Implies, TRUE, FALSE, Iff, Forall, And, Not, in_bool, Boolean
from proveit import A, B, C
%begin theorems
Defining theorems for theory 'proveit.logic.booleans.implication'
Subsequent end-of-cell assignments will define theorems
'%end theorems' will finalize the definitions
In [2]:
self_implication = Forall(A, Implies(A, A))
self_implication (established theorem):

In [3]:
true_implies_true = Implies(TRUE, TRUE)
true_implies_true (established theorem):

In [4]:
false_implies_false = Implies(FALSE, FALSE)
false_implies_false (established theorem):

In [5]:
false_implies_true = Implies(FALSE, TRUE)
false_implies_true (established theorem):

In [6]:
implies_t_t = Equals(Implies(TRUE, TRUE), TRUE)
implies_t_t (established theorem):

In [7]:
implies_f_f = Equals(Implies(FALSE, FALSE), TRUE)
implies_f_f (established theorem):

In [8]:
implies_f_t = Equals(Implies(FALSE, TRUE), TRUE)
implies_f_t (established theorem):

In [9]:
true_implies_false_negated = Not(Implies(TRUE, FALSE))
true_implies_false_negated (established theorem):

In [10]:
false_antecedent_implication = Forall(A, Implies(FALSE, A), domain=Boolean)
false_antecedent_implication (established theorem):

In [11]:
falsified_antecedent_implication = Forall((A, B), Implies(A, B), condition=Not(A))
falsified_antecedent_implication (established theorem):

In [12]:
untrue_antecedent_implication = Forall((A, B), Implies(A, B), condition=NotEquals(A, TRUE))
untrue_antecedent_implication (established theorem):

In [13]:
invalid_implication = Forall((A, B), Not(Implies(A, B)), conditions=[A, Not(B)])
invalid_implication (conjecture without proof):

In [14]:
not_true_via_contradiction = Forall(A, NotEquals(A,TRUE), conditions=Implies(A,FALSE))
not_true_via_contradiction (established theorem):

In [15]:
implication_transitivity = Forall((A, B, C), Implies(A, C), conditions=[Implies(A, B), Implies(B, C)])
implication_transitivity (established theorem):

In [16]:
modus_tollens_affirmation = Forall(A, Forall(B, A, conditions=[Implies(Not(A), B), Not(B)]), domain=Boolean)
modus_tollens_affirmation (established theorem):

In [17]:
modus_tollens_denial = Forall(A, Forall(B, Not(A), conditions=[Implies(A, B), Not(B)]), domain=Boolean)
modus_tollens_denial (established theorem):

In [18]:
negated_reflex = Forall((A,B), Implies(B,A), condition=Not(Implies(A,B)))
negated_reflex (established theorem):

In [19]:
iff_intro = Forall((A, B), Iff(A, B), conditions=[Implies(A, B), Implies(B, A)])
iff_intro (established theorem):

In [20]:
iff_via_both_true = Forall((A, B), Iff(A, B), conditions=[A, B])
iff_via_both_true (established theorem):

In [21]:
iff_via_both_false = Forall((A, B), Iff(A, B), 
                            conditions=[Not(A), Not(B)])
iff_via_both_false (conjecture without proof):

In [22]:
not_iff_via_not_right_impl = Forall((A, B), Not(Iff(A, B)), condition=Not(Implies(A, B)))
not_iff_via_not_right_impl (established theorem):

In [23]:
not_iff_via_not_left_impl = Forall((A, B), Not(Iff(A, B)), condition=Not(Implies(B, A)))
not_iff_via_not_left_impl (established theorem):

In [24]:
not_iff_via_not_right = Forall((A, B), Not(Iff(A, B)), conditions=[A, Not(B)])
not_iff_via_not_right (conjecture without proof):

In [25]:
not_iff_via_not_left = Forall((A, B), Not(Iff(A, B)), conditions=[Not(A), B])
not_iff_via_not_left (conjecture without proof):

In [26]:
true_iff_true = Iff(TRUE, TRUE)
true_iff_true (established theorem):

In [27]:
iff_t_t = Equals(Iff(TRUE, TRUE), TRUE)
iff_t_t (established theorem):

In [28]:
false_iff_false = Iff(FALSE, FALSE)
false_iff_false (established theorem):

In [29]:
iff_f_f = Equals(Iff(FALSE, FALSE), TRUE)
iff_f_f (established theorem):

In [30]:
iff_t_f = Equals(Iff(TRUE, FALSE), FALSE)
iff_t_f (established theorem):

In [31]:
true_iff_false_negated = Not(Iff(TRUE, FALSE))
true_iff_false_negated (established theorem):

In [32]:
iff_f_t = Equals(Iff(FALSE, TRUE), FALSE)
iff_f_t (established theorem):

In [33]:
false_iff_true_negated = Not(Iff(FALSE, TRUE))
false_iff_true_negated (established theorem):

In [34]:
iff_implies_right = Forall((A, B), Implies(A, B), conditions=[Iff(A, B)])
iff_implies_right (established theorem):

In [35]:
iff_implies_left = Forall((A, B), Implies(B, A), conditions=[Iff(A, B)])
iff_implies_left (established theorem):

In [36]:
right_from_iff = Forall((A, B), B, conditions=[A, Iff(A, B)])
right_from_iff (established theorem):

In [37]:
left_from_iff = Forall((A, B), A, conditions=[Iff(A, B), B])
left_from_iff (established theorem):

In [38]:
iff_symmetry = Forall((A, B), Iff(B, A), conditions=[Iff(A, B)])
iff_symmetry (established theorem):

In [39]:
iff_transitivity = Forall((A, B, C), Iff(A, C), conditions=[Iff(A, B), Iff(B, C)])
iff_transitivity (established theorem):

In [40]:
from_contraposition = Forall((A, B), Implies(A, B), conditions=[Implies(Not(B), Not(A)), in_bool(B)])
from_contraposition (established theorem):

In [41]:
to_contraposition = Forall((A, B), Implies(Not(B), Not(A)), conditions=[Implies(A, B), in_bool(A)])
to_contraposition (established theorem):

In [42]:
contrapose_neg_antecedent = Forall((A, B), Implies(Not(B), A), conditions=[Implies(Not(A), B), in_bool(A)])
contrapose_neg_antecedent (established theorem):

In [43]:
contrapose_neg_consequent = Forall((A, B), Implies(B, Not(A)), conditions=[Implies(A, Not(B)), in_bool(A)])
contrapose_neg_consequent (established theorem):

In [44]:
double_negate_consequent = Forall((A, B), Implies(A, Not(Not(B))), conditions=[Implies(A, B)])
double_negate_consequent (established theorem):

In [45]:
eq_from_iff = Forall((A, B), Equals(A, B), conditions=[Iff(A, B)], domain=Boolean)
eq_from_iff (conjecture with conjecture-based proof):

In [46]:
eq_from_mutual_impl = Forall((A, B), Equals(A, B), conditions=[Implies(A, B), Implies(B, A)], domain=Boolean)
eq_from_mutual_impl (conjecture with conjecture-based proof):

In [47]:
implication_closure = Forall((A, B), in_bool(Implies(A, B)), domain=Boolean)
implication_closure (conjecture with conjecture-based proof):

In [48]:
iff_closure = Forall((A, B), in_bool(Iff(A, B)), domain=Boolean)
iff_closure (conjecture with conjecture-based proof):

In [49]:
%end theorems
These theorems may now be imported from the theory package: proveit.logic.booleans.implication