logo
In [1]:
import proveit
from proveit import defaults
from proveit import m, x, y, A, B, S
from proveit.numbers import one, two
from proveit.logic import InSet, Union
from proveit.logic.sets.inclusion  import subset_eq_def
from proveit.logic.sets.unification  import union_def

theory = proveit.Theory() # the theorem's theory
In [2]:
%proving set_subset_eq_of_union_with_set
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
set_subset_eq_of_union_with_set:
(see dependencies)
In [3]:
defaults.assumptions = [set_subset_eq_of_union_with_set.condition]
defaults.assumptions:
In [4]:
set_subset_eq_of_union_with_set.condition.instantiate()
In [5]:
subset_eq_def
In [6]:
subset_eq_def_inst = subset_eq_def.instantiate({A:A, B:Union(A, B)})
subset_eq_def_inst:  ⊢  
In [7]:
union_def_inst = union_def.instantiate({m:two, x:x, A:[A, B]})
union_def_inst:  ⊢  
In [8]:
defaults.assumptions = [*defaults.assumptions, InSet(x, A)]
defaults.assumptions:
In [9]:
union_def_inst.rhs.prove()
In [10]:
union_def_inst.derive_left_via_equality()
In [11]:
subset_eq_def_inst.derive_left_via_equality(assumptions=[set_subset_eq_of_union_with_set.condition])
set_subset_eq_of_union_with_set may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [12]:
%qed
proveit.logic.sets.set_subset_eq_of_union_with_set has been proven.
Out[12]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation6, 2, 3  ⊢  
  : , :
2generalization4  ⊢  
3instantiation5  ⊢  
  : , :
4instantiation6, 7, 8,  ⊢  
  : , :
5axiom  ⊢  
 proveit.logic.sets.inclusion.subset_eq_def
6theorem  ⊢  
 proveit.logic.equality.lhs_via_equality
7instantiation9, 10, 11, 16,  ⊢  
  : , :
8instantiation12, 13, 14  ⊢  
  : , : , :
9conjecture  ⊢  
 proveit.logic.booleans.disjunction.or_if_left
10instantiation15, 16  ⊢  
  :
11instantiation17  ⊢  
  :
12axiom  ⊢  
 proveit.logic.sets.unification.union_def
13conjecture  ⊢  
 proveit.numbers.numerals.decimals.posnat2
14instantiation18  ⊢  
  : , :
15conjecture  ⊢  
 proveit.logic.booleans.in_bool_if_true
16assumption  ⊢  
17assumption  ⊢  
18conjecture  ⊢  
 proveit.numbers.numerals.decimals.tuple_len_2_typical_eq