verify_lemma_42 <- function (a, x, y, r) { yay <- sum (y * (a %*% y)) xax <- sum (x * (a %*% x)) xay <- sum (x * (a %*% y)) return (c (xax ^ r, (1 - 2 * r) * (yay ^ r) + 2 * r * (yay ^ (r - 1)) * xay)) } verify_lemma_43 <- function (a, x, r) { ma <- max (eigen(a)\$values) ax <- drop (a %*% x) xax <- sum (x * ax) h <- a + 2 * (r - 1) * outer (ax, ax) / xax d <- 2 * r * (xax ^ (r - 1)) * h l <- max (eigen (d)\$values) return (c (l, 2 * r * (2 * r - 1) * (ma ^ r) * (sum (x ^ 2) ^ (r-1)))) } verify_lemma_44 <- function (a, x, y, r) { yay <- sum (y * (a %*% y)) xax <- sum (x * (a %*% x)) xay <- sum (x * (a %*% y)) return (c (xax ^ r, (1 - r) * (yay ^ r) + r * (yay ^ (r - 1)) * xax)) } verify_lemma_45 <- function(a, x,y,r) { x <- x / sqrt (sum (x ^ 2)) y <- y / sqrt (sum (y ^ 2)) ma <- max (eigen(a)\$values) yay <- sum (y * (a %*% y)) xax <- sum (x * (a %*% x)) xay <- sum (x * (a %*% y)) s <- xay - ma * sum (x * y) + ma return (c (xax ^ r, (1 - 2 * r) * (yay ^ r) + 2 * r * s * (yay ^ (r - 1)))) } verify_lemma_46 <- function (a, x, r) { ma <- max (eigen(a)\$values) ax <- drop (a %*% x) xax <- sum (x * ax) h <- a + 2 * (r - 1) * outer (ax, ax) / xax d <- 2 * r * (xax ^ (r - 1)) * h l <- min (eigen (d)\$values) return (c (l, 2 * r * (2 * r - 1) * (ma ^ r) * (sum (x ^ 2) ^ (r-1)))) }