# Proof of proveit.physics.quantum.QPE._mod_add_closure theorem¶

In [1]:
import proveit
from proveit import defaults
from proveit import a, b
from proveit.logic import InSet
from proveit.numbers import Add, Integer
from proveit.numbers.modular import mod_int_closure
from proveit.physics.quantum.QPE import _two_pow_t            # common
from proveit.physics.quantum.QPE import _mod_add_def          # axioms
from proveit.physics.quantum.QPE import _two_pow_t_is_nat_pos # theorems
theory = proveit.Theory() # the theorem's theory

In [2]:
%proving _mod_add_closure

With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
(see dependencies)
In [3]:
defaults.assumptions = _mod_add_closure.conditions

defaults.assumptions:
In [4]:
_mod_add_def

In [5]:
mod_add_def_inst = _mod_add_def.instantiate({a:a, b:b})

In [6]:
mod_add_def_inst.rhs.deduce_in_interval()

In [7]:
%qed

proveit.physics.quantum.QPE._mod_add_closure has been proven.

Out[7]:
step typerequirementsstatement
0generalization1
1instantiation2, 3, 4,  ⊢
: , : , :
2theorem
proveit.logic.equality.sub_left_side_into
3instantiation5, 6, 7,  ⊢
: , :
4instantiation8, 10, 11,  ⊢
: , :
5conjecture
proveit.numbers.modular.mod_natpos_in_interval
6instantiation9, 10, 11,  ⊢
: , :
7conjecture
proveit.physics.quantum.QPE._two_pow_t_is_nat_pos
8axiom