Skip to content
Snippets Groups Projects
Commit 04e73735 authored by Luke Naylor's avatar Luke Naylor
Browse files

Use walrus op in asserts to keep track of alternative exprs pt 4 (real final)

parent 2c9071bc
No related branches found
No related tags found
No related merge requests found
......@@ -267,14 +267,21 @@ bgmlv1_d_lowerbound_linear_term = (
).expand()
# Verify the simplified forms of the terms that will be mentioned in text
var("chbv",domain="real") # symbol to represent ch_1^\beta(v)
assert bgmlv1_d_lowerbound_const_term == (
v.twist(beta_min).ch[2]/2
+ beta_min*q
(
# Keep hold of this alternative expression:
bgmlv1_d_lowerbound_const_term_alt :=
(
chbv/2
+ beta_min*q
)
)
.subs(chbv == v.twist(beta_min).ch[2])
.expand()
)
var("chbv",domain="real") # symbol to represent ch_1^\beta(v)
assert bgmlv1_d_lowerbound_exp_term == (
(
# Keep hold of this alternative expression:
......@@ -493,7 +500,7 @@ var("chbv",domain="real") # symbol to represent ch_1^\beta(v)
assert bgmlv3_d_upperbound_const_term == (
(
# keep hold of this alternative expression:
bgmlv3_d_upperbound_const_term_alt1 := (
bgmlv3_d_upperbound_const_term_alt := (
chbv
+ beta_min*q
)
......@@ -505,7 +512,7 @@ assert bgmlv3_d_upperbound_const_term == (
assert bgmlv3_d_upperbound_exp_term == (
(
# Keep hold of this alternative expression:
bgmlv3_d_upperbound_const_term_alt2 :=
bgmlv3_d_upperbound_exp_term_alt :=
(
R*chbv
+ (C - q)^2/2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment