From 04e73735ba6081655f055aee5a2cc1137e4c4240 Mon Sep 17 00:00:00 2001 From: Luke Naylor <l.naylor@sms.ed.ac.uk> Date: Wed, 10 May 2023 00:07:25 +0100 Subject: [PATCH] Use walrus op in asserts to keep track of alternative exprs pt 4 (real final) --- main.tex | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/main.tex b/main.tex index 88c3b8b..893d31f 100644 --- a/main.tex +++ b/main.tex @@ -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 -- GitLab