logo
In [1]:
import proveit
theory = proveit.Theory() # the theorem's theory
from proveit import n, x, A, defaults
from proveit.logic import Equals, Implies, InSet, Not, NotEquals, Or
from proveit.logic.booleans import unfold_is_bool
from proveit.numbers import zero, one, two, frac, IntervalOO, Less, Neg
from proveit.numbers.number_sets.real_numbers import not_int_if_not_int_in_interval
from proveit.physics.quantum.QPE import _delta_b, _delta_b_in_interval
In [2]:
%proving _delta_b_is_zero_or_non_int
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
_delta_b_is_zero_or_non_int:
(see dependencies)
In [3]:
defaults.assumptions = _delta_b_is_zero_or_non_int.all_conditions()
defaults.assumptions:
In [4]:
_delta_b_in_interval
In [5]:
_delta_b_in_interval_inst = _delta_b_in_interval.instantiate()
_delta_b_in_interval_inst:  ⊢  
In [6]:
neg_one_less_neg_one_half = Less(Neg(one), Neg(frac(one, two))).prove()
neg_one_less_neg_one_half:  ⊢  
In [7]:
Less(frac(one, two), one).prove()

Now Prove-It can derive the expanded interval membership for $\delta_{b_r}$:

In [8]:
InSet(_delta_b, IntervalOO(Neg(one), one)).prove()

Establish that $(\delta = 0) \lor (\lnot[\delta = 0])$ using a version of the Law of the Excluded Middle

In [9]:
unfold_is_bool
In [10]:
non_zero_assumption = NotEquals(_delta_b, zero)
non_zero_assumption:
In [11]:
zero_assumption = Equals(_delta_b, zero)
zero_assumption:
In [12]:
delta_b_is_zero_or_not = unfold_is_bool.instantiate({A: zero_assumption})
delta_b_is_zero_or_not:  ⊢  

Establish that the assumptions $(\delta = 0)$ and $(\lnot[\delta = 0])$ each imply that $(\delta = 0) \lor (\delta_{b} \notin \mathbb{Z})$

First, assuming that $\delta_b \ne 0$

In [13]:
not_int_if_not_int_in_interval
In [14]:
not_zero_assumption_gives_not_int = not_int_if_not_int_in_interval.instantiate(
    {n: zero, x: _delta_b},
    assumptions=[*defaults.assumptions, non_zero_assumption])
not_zero_assumption_gives_not_int: ,  ⊢  
In [15]:
Or(zero_assumption, not_zero_assumption_gives_not_int.expr).prove(
        assumptions=[*defaults.assumptions, non_zero_assumption]).as_implication(hypothesis=non_zero_assumption)
In [16]:
not_zero_implies_not_eq_zero = non_zero_assumption.conclude_as_folded(
        assumptions = [Not(zero_assumption)]).as_implication(hypothesis=Not(zero_assumption))
not_zero_implies_not_eq_zero:  ⊢  
In [17]:
Implies(Not(zero_assumption), Or(zero_assumption, not_zero_assumption_gives_not_int.expr)).prove()

Second, assuming that $\delta_b = 0$ (the trivial case)

In [18]:
Or(zero_assumption, not_zero_assumption_gives_not_int.expr).prove(
        assumptions=[*defaults.assumptions, zero_assumption]).as_implication(hypothesis=zero_assumption)

Thus in all cases we have the desired conclusion:

In [19]:
delta_b_is_zero_or_not.derive_via_singular_dilemma(_delta_b_is_zero_or_non_int.instance_expr)
_delta_b_is_zero_or_non_int may now be readily provable (assuming required theorems are usable).  Simply execute "%qed".
In [20]:
%qed
proveit.physics.quantum.QPE._delta_b_is_zero_or_non_int has been proven.
Out[20]:
 step typerequirementsstatement
0generalization1  ⊢  
1instantiation2, 9, 3, 4, 5, 6  ⊢  
  : , : , :
2theorem  ⊢  
 proveit.logic.booleans.disjunction.singular_constructive_dilemma
3instantiation7, 9  ⊢  
  :
4instantiation8, 9  ⊢  
  :
5deduction10  ⊢  
6instantiation11, 12, 13  ⊢  
  : , :
7conjecture  ⊢  
 proveit.logic.booleans.negation.closure
8conjecture  ⊢  
 proveit.logic.booleans.unfold_is_bool
9instantiation14  ⊢  
  : , :
10instantiation15, 33, 16  ⊢  
  : , :
11theorem  ⊢  
 proveit.logic.equality.rhs_via_equality
12deduction17  ⊢  
13instantiation18, 19  ⊢  
  : , : , :
14axiom  ⊢  
 proveit.logic.equality.equality_in_bool
15theorem  ⊢  
 proveit.logic.booleans.disjunction.or_if_only_left
16instantiation20, 21  ⊢  
  : , :
17instantiation22, 23, 24,  ⊢  
  : , :
18axiom  ⊢  
 proveit.logic.equality.substitution
19instantiation25  ⊢  
  : , :
20conjecture  ⊢  
 proveit.logic.sets.membership.double_negated_membership
21instantiation148, 149, 26  ⊢  
  : , : , :
22theorem  ⊢  
 proveit.logic.booleans.disjunction.or_if_only_right
23instantiation27, 31  ⊢  
  : , :
24instantiation28, 29, 30, 31,  ⊢  
  : , :
25axiom  ⊢  
 proveit.logic.equality.not_equals_def
26instantiation32, 75, 33  ⊢  
  : , : , :
27theorem  ⊢  
 proveit.logic.equality.unfold_not_equals
28conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.not_int_if_not_int_in_interval
29conjecture  ⊢  
 proveit.numbers.number_sets.integers.zero_is_int
30instantiation34, 35, 36, 90, 37  ⊢  
  : , : , :
31assumption  ⊢  
32theorem  ⊢  
 proveit.logic.equality.sub_left_side_into
33assumption  ⊢  
34conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.in_IntervalOO
35instantiation53, 39, 38  ⊢  
  : , :
36instantiation53, 39, 107  ⊢  
  : , :
37instantiation40, 41, 42  ⊢  
  : , :
38instantiation148, 144, 43  ⊢  
  : , : , :
39conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.zero_is_real
40theorem  ⊢  
 proveit.logic.booleans.conjunction.and_if_both
41instantiation44, 98, 45, 46, 47*, 48*  ⊢  
  : , : , :
42instantiation49, 50, 51  ⊢  
  : , : , :
43instantiation148, 146, 52  ⊢  
  : , : , :
44conjecture  ⊢  
 proveit.numbers.addition.strong_bound_via_left_term_bound
45instantiation53, 90, 109  ⊢  
  : , :
46instantiation54, 98, 90, 109, 55, 56  ⊢  
  : , : , :
47instantiation64, 57, 58, 59  ⊢  
  : , : , : , :
48instantiation112, 60, 61  ⊢  
  : , : , :
49theorem  ⊢  
 proveit.logic.equality.sub_right_side_into
50instantiation62, 90, 109, 63, 70  ⊢  
  : , : , :
51instantiation64, 72, 65, 66  ⊢  
  : , : , : , :
52instantiation67, 126  ⊢  
  :
53conjecture  ⊢  
 proveit.numbers.addition.add_real_closure_bin
54conjecture  ⊢  
 proveit.numbers.ordering.less_add_right
55instantiation68, 98, 109, 99  ⊢  
  : , : , :
56instantiation69, 70  ⊢  
  : , :
57instantiation71, 80, 96, 72  ⊢  
  : , : , :
58instantiation91  ⊢  
  :
59instantiation84, 73  ⊢  
  : , :
60instantiation74, 75, 150, 134, 76, 77, 81, 80, 78  ⊢  
  : , : , : , : , : , :
61instantiation79, 80, 81, 82  ⊢  
  : , : , :
62conjecture  ⊢  
 proveit.numbers.ordering.less_eq_add_right_strong
63instantiation83, 98, 109, 99  ⊢  
  : , : , :
64conjecture  ⊢  
 proveit.logic.equality.four_chain_transitivity
65instantiation91  ⊢  
  :
66instantiation84, 85  ⊢  
  : , :
67conjecture  ⊢  
 proveit.numbers.negation.int_closure
68conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.interval_oc_lower_bound
69conjecture  ⊢  
 proveit.numbers.ordering.relax_less
70instantiation86, 128  ⊢  
  :
71conjecture  ⊢  
 proveit.numbers.addition.subtraction.negated_add
72instantiation87, 126, 147, 88*  ⊢  
  : , : , : , :
73instantiation92, 89  ⊢  
  :
74conjecture  ⊢  
 proveit.numbers.addition.disassociation
75axiom  ⊢  
 proveit.numbers.number_sets.natural_numbers.zero_in_nats
76conjecture  ⊢  
 proveit.core_expr_types.tuples.tuple_len_0_typical_eq
77instantiation129  ⊢  
  : , :
78instantiation148, 138, 98  ⊢  
  : , : , :
79conjecture  ⊢  
 proveit.numbers.addition.subtraction.add_cancel_triple_23
80instantiation148, 138, 109  ⊢  
  : , : , :
81instantiation148, 138, 90  ⊢  
  : , : , :
82instantiation91  ⊢  
  :
83conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.interval_oc_upper_bound
84theorem  ⊢  
 proveit.logic.equality.equals_reversal
85instantiation92, 96  ⊢  
  :
86conjecture  ⊢  
 proveit.numbers.number_sets.rational_numbers.positive_if_in_rational_pos
87conjecture  ⊢  
 proveit.numbers.addition.rational_pair_addition
88instantiation112, 93, 94  ⊢  
  : , : , :
89instantiation95, 96  ⊢  
  :
90instantiation97, 98, 109, 99  ⊢  
  : , : , :
91axiom  ⊢  
 proveit.logic.equality.equals_reflexivity
92conjecture  ⊢  
 proveit.numbers.addition.elim_zero_left
93instantiation120, 150, 100, 101, 102, 103  ⊢  
  : , : , : , :
94instantiation104, 105, 106  ⊢  
  :
95conjecture  ⊢  
 proveit.numbers.negation.complex_closure
96instantiation148, 138, 107  ⊢  
  : , : , :
97conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.all_in_interval_oc__is__real
98instantiation108, 109  ⊢  
  :
99instantiation110, 111  ⊢  
  :
100instantiation129  ⊢  
  : , :
101instantiation129  ⊢  
  : , :
102instantiation112, 113, 114  ⊢  
  : , : , :
103conjecture  ⊢  
 proveit.numbers.numerals.decimals.mult_2_2
104conjecture  ⊢  
 proveit.numbers.division.frac_cancel_complete
105instantiation148, 138, 115  ⊢  
  : , : , :
106instantiation116, 117  ⊢  
  :
107instantiation148, 144, 118  ⊢  
  : , : , :
108conjecture  ⊢  
 proveit.numbers.negation.real_closure
109instantiation148, 144, 119  ⊢  
  : , : , :
110conjecture  ⊢  
 proveit.physics.quantum.QPE._delta_b_in_interval
111assumption  ⊢  
112axiom  ⊢  
 proveit.logic.equality.equals_transitivity
113instantiation120, 150, 121, 122, 123, 124  ⊢  
  : , : , : , :
114conjecture  ⊢  
 proveit.numbers.numerals.decimals.add_2_2
115instantiation148, 144, 125  ⊢  
  : , : , :
116conjecture  ⊢  
 proveit.numbers.number_sets.natural_numbers.nonzero_if_is_nat_pos
117conjecture  ⊢  
 proveit.numbers.numerals.decimals.posnat4
118instantiation148, 146, 126  ⊢  
  : , : , :
119instantiation148, 127, 128  ⊢  
  : , : , :
120axiom  ⊢  
 proveit.core_expr_types.operations.operands_substitution
121instantiation129  ⊢  
  : , :
122instantiation129  ⊢  
  : , :
123instantiation130, 132  ⊢  
  :
124instantiation131, 132  ⊢  
  :
125instantiation148, 146, 133  ⊢  
  : , : , :
126instantiation148, 149, 134  ⊢  
  : , : , :
127conjecture  ⊢  
 proveit.numbers.number_sets.rational_numbers.rational_pos_within_rational
128instantiation135, 136, 137  ⊢  
  : , :
129conjecture  ⊢  
 proveit.numbers.numerals.decimals.tuple_len_2_typical_eq
130conjecture  ⊢  
 proveit.numbers.multiplication.elim_one_left
131conjecture  ⊢  
 proveit.numbers.multiplication.elim_one_right
132instantiation148, 138, 139  ⊢  
  : , : , :
133instantiation148, 149, 140  ⊢  
  : , : , :
134theorem  ⊢  
 proveit.numbers.numerals.decimals.nat1
135conjecture  ⊢  
 proveit.numbers.division.div_rational_pos_closure
136instantiation148, 142, 141  ⊢  
  : , : , :
137instantiation148, 142, 143  ⊢  
  : , : , :
138conjecture  ⊢  
 proveit.numbers.number_sets.complex_numbers.real_within_complex
139instantiation148, 144, 145  ⊢  
  : , : , :
140conjecture  ⊢  
 proveit.numbers.numerals.decimals.nat4
141conjecture  ⊢  
 proveit.numbers.numerals.decimals.posnat1
142conjecture  ⊢  
 proveit.numbers.number_sets.rational_numbers.nat_pos_within_rational_pos
143conjecture  ⊢  
 proveit.numbers.numerals.decimals.posnat2
144conjecture  ⊢  
 proveit.numbers.number_sets.real_numbers.rational_within_real
145instantiation148, 146, 147  ⊢  
  : , : , :
146conjecture  ⊢  
 proveit.numbers.number_sets.rational_numbers.int_within_rational
147instantiation148, 149, 150  ⊢  
  : , : , :
148theorem  ⊢  
 proveit.logic.sets.inclusion.superset_membership_from_proper_subset
149conjecture  ⊢  
 proveit.numbers.number_sets.integers.nat_within_int
150conjecture  ⊢  
 proveit.numbers.numerals.decimals.nat2
*equality replacement requirements