logo
In [1]:
import proveit
theory = proveit.Theory() # the theorem's theory

from proveit import defaults
from proveit import b, m
from proveit.logic import Or, Equals, InSet
from proveit.numbers import zero, one, Integer, Neg, Abs, Mod, sqrd
from proveit.numbers.number_sets.real_numbers import pi_between_3_and_4
from proveit.physics.quantum.QPE import (
    _outcome_prob, qpe_exact, _best_guarantee, _alpha_ideal_case, 
    _phase_is_real, _phase_in_interval,
    _b_round, _best_round_def, _best_round_is_int, _delta_b_round, _delta_b_def,
    _two_pow_t, _t_in_natural_pos, _two_pow_t_is_nat_pos)
In [2]:
%proving qpe_best_guarantee
With these allowed/disallowed theorem/theory presumptions (e.g., to avoid circular dependencies), we begin our proof of
qpe_best_guarantee:
(see dependencies)
In [3]:
_outcome_prob
In [4]:
_best_guarantee

Now instantiate _outcome_prob for the rounded, 'best' case

In [5]:
_m = _best_guarantee.lhs.base.operand.index
_m:
In [6]:
outcome_prob_bound = _outcome_prob.instantiate({m:_m}).apply_transitivity(_best_guarantee)
outcome_prob_bound:  ⊢  

Perform literal generalization, converting literals to quantified variables and their definining axioms into conditions

In [7]:
(outcome_prob_bound.generalize(
            qpe_best_guarantee.instance_param_lists(),
            conditions=qpe_best_guarantee.all_conditions())
       .inner_expr().instance_expr.instance_expr.instance_expr.with_wrapping()
       .inner_expr().instance_expr.instance_expr.with_wrapping())
qpe_best_guarantee has been proven.  Now simply execute "%qed".