logo
In [1]:
import proveit
theory = proveit.Theory() # the theorem's theory
from proveit import n, x, y, defaults
from proveit.numbers import zero
from proveit.numbers.ordering import max_def_bin
In [2]:
%proving max_nat_n_zero_is_n
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
max_nat_n_zero_is_n:
(see dependencies)
In [3]:
defaults.assumptions = max_nat_n_zero_is_n.conditions
defaults.assumptions:
In [4]:
max_def_bin

In the following instantiation, we need to set auto_simplify=False, else we over-simplify and end up with the unhelpful $n = n$:

In [ ]:
 
In [5]:
max_def_bin_inst = max_def_bin.instantiate({x: n, y: zero}, auto_simplify=False)
max_def_bin_inst:  ⊢  

Prove-It can then complete the formal proof on its own, but it's nice to explicitly show the final step before handing it off to Prove-It:

In [ ]:
 
In [6]:
max_def_bin_inst.inner_expr().rhs.simplify()
max_nat_n_zero_is_n may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [7]:
%qed
proveit.numbers.ordering.max_nat_n_zero_is_n has been proven.
Out[7]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 3, 4  ⊢  
  : , : , :
2theorem  ⊢  
 proveit.logic.equality.sub_right_side_into
3instantiation5, 23, 22  ⊢  
  : , :
4instantiation8, 6, 7  ⊢  
  : , : , :
5axiom  ⊢  
 proveit.numbers.ordering.max_def_bin
6instantiation8, 9, 10  ⊢  
  : , : , :
7instantiation11, 12, 13, 14  ⊢  
  : , : , : , : , :
8axiom  ⊢  
 proveit.logic.equality.equals_transitivity
9instantiation16, 15  ⊢  
  : , : , :
10instantiation16, 17  ⊢  
  : , : , :
11axiom  ⊢  
 proveit.core_expr_types.conditionals.true_case_reduction
12axiom  ⊢  
 proveit.numbers.number_sets.natural_numbers.zero_in_nats
13theorem  ⊢  
 proveit.numbers.numerals.decimals.nat1
14conjecture  ⊢  
 proveit.core_expr_types.tuples.tuple_len_0_typical_eq
15instantiation18, 24  ⊢  
  : , :
16axiom  ⊢  
 proveit.logic.equality.substitution
17instantiation19, 20  ⊢  
  : , :
18conjecture  ⊢  
 proveit.core_expr_types.conditionals.satisfied_condition_reduction
19conjecture  ⊢  
 proveit.core_expr_types.conditionals.dissatisfied_condition_reduction
20instantiation21, 22, 23, 24  ⊢  
  : , :
21conjecture  ⊢  
 proveit.numbers.ordering.not_less_from_less_eq
22conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.zero_is_real
23instantiation25, 26, 28  ⊢  
  : , : , :
24instantiation27, 28  ⊢  
  :
25theorem  ⊢  
 proveit.logic.sets.inclusion.unfold_subset_eq
26instantiation29, 30  ⊢  
  : , :
27conjecture  ⊢  
 proveit.numbers.number_sets.natural_numbers.natural_lower_bound
28assumption  ⊢  
29theorem  ⊢  
 proveit.logic.sets.inclusion.relax_proper_subset
30conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.nat_within_real