(* Title: Octonions.thy Author:AngelikiKoutsoukou-Argyraki,UniversityofCambridge Date:September2018
*) section‹Theory of Octonions› theory Octonions imports Cross_Product_7 begin
subsection‹Basic definitions›
text‹As with the complex numbers, coinduction is convenient.›
codatatype octo =
Octo (Ree: real) (Im1: real) (Im2: real) (Im3: real) (Im4: real)
(Im5: real) (Im6: real) (Im7: real)
lemma octo_eqI [intro?]: "[Ree x = Ree y; Im1 x = Im1 y; Im2 x = Im2 y; Im3 x = Im3 y; Im4 x = Im4 y;Im5 x = Im5 y; Im6 x = Im6 y; Im7 x = Im7 y]==> x = y" by (rule octo.expand) simp
lemma octo_eq_iff: "x = y ⟷ Ree x = Ree y ∧ Im1 x = Im1 y ∧ Im2 x = Im2 y ∧ Im3 x = Im3 y ∧ Im4 x = Im4 y ∧ Im5 x = Im5 y ∧ Im6 x = Im6 y ∧ Im7 x = Im7 y" by (auto intro: octo.expand)
primcorec minus_octo where "Ree (x - y) = Ree x - Ree y"
| "Im1 (x - y) = Im1 x - Im1 y"
| "Im2 (x - y) = Im2 x - Im2 y"
| "Im3 (x - y) = Im3 x - Im3 y"
| "Im4 (x - y) = Im4 x - Im4 y"
| "Im5 (x - y) = Im5 x - Im5 y"
| "Im6 (x - y) = Im6 x - Im6 y"
| "Im7 (x - y) = Im7 x - Im7 y"
instance by standard (simp_all add: octo_eq_iff)
end
lemma octo_eq_0_iff: "x = 0 ⟷ Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 + Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^ 2 = 0" proof assume"(octo.Ree x)2 + (Im1 x)2 + (Im2 x)2 + (Im3 x)2 + (Im4 x)2 + (Im5 x)2 + (Im6 x)2 + (Im7 x)2 = 0" thenhave"∀qa. qa - x = qa" by (simp add: add_nonneg_eq_0_iff minus_octo.ctr) thenshow"x = 0" by simp qed auto
subsection‹A Normed Vector Space›
instantiation octo :: real_vector
begin
primcorec scaleR_octo where "Ree (scaleR r x) = r * Ree x"
| "Im1 (scaleR r x) = r * Im1 x"
| "Im2 (scaleR r x) = r * Im2 x"
| "Im3 (scaleR r x) = r * Im3 x"
| "Im4 (scaleR r x) = r * Im4 x"
| "Im5 (scaleR r x) = r * Im5 x"
| "Im6 (scaleR r x) = r * Im6 x"
| "Im7 (scaleR r x) = r * Im7 x"
instance by standard (auto simp: octo_eq_iff distrib_left distrib_right scaleR_add_right)
definition"dist x y = norm (x - y)"for x y :: octo
definition [code del]: "(uniformity :: (octo × octo) filter) = (INF e∈{0 <..}. principal {(x, y). dist x y < e})"
definition [code del]: "open (U :: octo set) ⟷ (∀x∈U. eventually (λ(x', y). x' = x ⟶ y ∈ U) uniformity)"
lemma norm_eq_L2: "norm x = L2_set (octo_proj x) {..7}" by (simp add: norm_octo_def L2_set_def eval_nat_numeral)
instanceproof fix r :: real and x y :: octo and S :: "octo set" show"(norm x = 0) ⟷ (x = 0)" by (simp add: norm_octo_def octo_eq_iff add_nonneg_eq_0_iff) have eq: "L2_set (octo_proj (x + y)) {..7} = L2_set (λi. octo_proj x i + octo_proj y i) {..7}" by (rule L2_set_cong) (auto simp: octo_proj_add) show"norm (x + y) ≤ norm x + norm y" by (simp add: norm_eq_L2 eq L2_set_triangle_ineq) show"norm (scaleR r x) = ∣r∣ * norm x" by (simp add: norm_octo_def octo_eq_iff
power_mult_distrib distrib_left [symmetric] real_sqrt_mult) qed (rule sgn_octo_def dist_octo_def open_octo_def uniformity_octo_def)+
end
lemma norm_octo_squared: "norm x ^ 2 = Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 + Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^ 2" by (simp add: norm_octo_def)
instantiation octo :: real_inner begin
definition inner_octo where "inner_octo x y = Ree x * Ree y + Im1 x * Im1 y + Im2 x * Im2 y + Im3 x * Im3 y + Im4 x * Im4 y + Im5 x * Im5 y + Im6 x * Im6 y + Im7 x * Im7 y "for x y::octo
instance by standard (auto simp: inner_octo_def algebra_simps norm_octo_def
power2_eq_square octo_eq_iff add_nonneg_eq_0_iff)
end
lemma octo_inner_1 [simp]: "inner 1 x = Ree x" and octo_inner_1_right [simp]: "inner x 1 = Ree x" unfolding inner_octo_def by simp_all
lemma octo_inner_e1_left [simp]: "inner e1 x = Im1 x" and octo_inner_e1_right [simp]: "inner x e1 = Im1 x" unfolding inner_octo_def by simp_all
lemma octo_inner_e2_left [simp]: "inner e2 x = Im2 x" and octo_inner_e2_right [simp]: "inner x e2 = Im2 x" unfolding inner_octo_def by simp_all
lemma octo_inner_e3_left [simp]: "inner e3 x = Im3 x" and octo_inner_e3_right [simp]: "inner x e3 = Im3 x" unfolding inner_octo_def by simp_all
lemma octo_inner_e4_left [simp]: "inner e4 x = Im4 x" and octo_inner_e4_right [simp]: "inner x e4 = Im4 x" unfolding inner_octo_def by simp_all
lemma octo_inner_e5_left [simp]: "inner e5 x = Im5 x" and octo_inner_e5_right [simp]: "inner x e5 = Im5 x" unfolding inner_octo_def by simp_all
lemma octo_inner_e6_left [simp]: "inner e6 x = Im6 x" and octo_inner_e6_right [simp]: "inner x e6 = Im6 x" unfolding inner_octo_def by simp_all
lemma octo_inner_e7_left [simp]: "inner e7 x = Im7 x" and octo_inner_e7_right [simp]: "inner x e7 = Im7 x" unfolding inner_octo_def by simp_all
lemma octo_norm_pow_2_inner: "(norm x) ^ 2 = inner x x "for x::octo by (simp add: dot_square_norm)
lemma octo_norm_property: "inner x y = (1/2)* ((norm(x+y))^2 - (norm(x))^2 - (norm(y))^2) "for x y ::octo by (simp add: dot_norm norm_octo_def)
subsection‹The Octonionic product and related properties and lemmas›
text‹The multiplication is defined following one of the 480 equivalent multiplication tables
an analogy to the definition of the 7D cross product. ›
instantiation octo :: times begin
definition times_octo :: "[octo, octo] ==> octo" where "(a * b) = (let t0 = Ree a * Ree b - Im1 a * Im1 b - Im2 a * Im2 b- Im3 a * Im3 b - Im4 a * Im4 b - Im5 a * Im5 b - Im6 a * Im6 b -Im7 a * Im7 b ; t1 = Ree a * Im1 b + Im1 a * Ree b + Im2 a * Im4 b +Im3 a * Im7 b - Im4 a * Im2 b +Im5 a * Im6 b - Im6 a * Im5 b - Im7 a * Im3 b ; t2 = Ree a * Im2 b - Im1 a * Im4 b+ Im2 a * Ree b + Im3 a * Im5 b + Im4 a * Im1 b - Im5 a * Im3 b + Im6 a * Im7 b - Im7 a *Im6 b ; t3 = Ree a * Im3 b -Im1 a * Im7 b -Im2 a *Im5 b +Im3 a * Ree b + Im4 a * Im6 b + Im5 a *Im2 b - Im6 a * Im4 b + Im7 a * Im1 b ; t4 = Ree a * Im4 b + Im1 a * Im2 b - Im2 a * Im1 b -Im3 a * Im6 b + Im4 a * Ree b +Im5 a * Im7 b +Im6 a * Im3 b -Im7 a * Im5 b ; t5 = Ree a * Im5 b - Im1 a * Im6 b +Im2 a * Im3 b -Im3 a * Im2 b -Im4 a * Im7 b +Im5 a * Ree b +Im6 a * Im1 b + Im7 a * Im4 b; t6 = Ree a * Im6 b + Im1 a * Im5 b - Im2 a * Im7 b +Im3 a * Im4 b - Im4 a * Im3 b -Im5 a * Im1 b + Im6 a * Ree b + Im7 a * Im2 b ; t7 = Ree a * Im7 b + Im1 a * Im3 b +Im2 a * Im6 b - Im3 a * Im1 b + Im4 a * Im5 b -Im5 a * Im4 b - Im6 a * Im2 b +Im7 a * Ree b in Octo t0 t1 t2 t3 t4 t5 t6 t7)"
instanceby standard
end
instantiation octo ::inverse begin
primcorec inverse_octo where "Ree (inverse x) = Ree x / (Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 +Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^2 )"
| "Im1 (inverse x) = - (Im1 x) / (Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 +Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^2)"
| "Im2 (inverse x) = - (Im2 x) / (Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 +Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^2 )"
| "Im3 (inverse x) = - (Im3 x) / (Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 +Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^2 )"
| "Im4 (inverse x) = - (Im4 x) / (Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 +Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^2 )"
| "Im5 (inverse x) = - (Im5 x) / (Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 +Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^2)"
| "Im6 (inverse x) = - (Im6 x) / (Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 +Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^2 )"
| "Im7 (inverse x) = - (Im7 x) / (Ree x ^ 2 + Im1 x ^ 2 + Im2 x ^ 2 + Im3 x ^ 2 +Im4 x ^ 2 + Im5 x ^ 2 + Im6 x ^ 2 + Im7 x ^2 )"
definition"x div y = x * ( inverse y)"for x y :: octo
instanceby standard
end
lemma octo_mult_components: "Ree (x * y ) = Ree x * Ree y - Im1 x * Im1 y - Im2 x * Im2 y - Im3 x * Im3 y - Im4 x * Im4 y - Im5 x * Im5 y - Im6 x * Im6 y- Im7 x * Im7 y" "Im1 (x * y ) = Ree x * Im1 y + Im1 x * Ree y + Im2 x * Im4 y +Im3 x * Im7 y - Im4 x * Im2 y +Im5 x * Im6 y - Im6 x * Im5 y - Im7 x * Im3 y " " Im2 (x * y ) = Ree x * Im2 y - Im1 x * Im4 y+ Im2 x * Ree y + Im3 x * Im5 y + Im4 x * Im1 y - Im5 x * Im3 y + Im6 x * Im7 y - Im7 x *Im6 y " " Im3 (x * y ) = Ree x * Im3 y -Im1 x * Im7 y -Im2 x *Im5 y +Im3 x * Ree y + Im4 x * Im6 y + Im5 x *Im2 y - Im6 x * Im4 y + Im7 x * Im1 y " "Im4 (x *y ) = Ree x * Im4 y + Im1 x * Im2 y - Im2 x * Im1 y -Im3 x * Im6 y + Im4 x * Ree y +Im5 x * Im7 y +Im6 x * Im3 y -Im7 x * Im5 y " "Im5 (x * y ) = Ree x * Im5 y - Im1 x * Im6 y +Im2 x * Im3 y -Im3 x * Im2 y -Im4 x * Im7 y +Im5 x * Ree y +Im6 x * Im1 y + Im7 x * Im4 y " " Im6 (x * y) = Ree x * Im6 y + Im1 x * Im5 y - Im2 x * Im7 y +Im3 x * Im4 y - Im4 x * Im3 y -Im5 x * Im1 y + Im6 x * Ree y + Im7 x * Im2 y " "Im7 (x * y) = Ree x * Im7 y + Im1 x * Im3 y +Im2 x * Im6 y - Im3 x * Im1 y + Im4 x * Im5 y -Im5 x * Im4 y - Im6 x * Im2 y +Im7 x * Ree y " unfolding times_octo_def by auto
lemma octo_distrib_left : "a * (b + c) = a * b + a * c"for a b c ::octo unfolding times_octo_def plus_octo_def minus_octo_def uminus_octo_def scaleR_octo_def by (simp add: octo_eq_iff octo_mult_components algebra_simps)
lemma octo_distrib_right : "(b + c) * a = b * a + c * a"for a b c ::octo unfolding times_octo_def plus_octo_def minus_octo_def uminus_octo_def scaleR_octo_def by (simp add: octo_eq_iff octo_mult_components algebra_simps)
lemma multiplicative_norm_octo: "norm (x * y) = norm x * norm y"for x y ::octo proof - have"norm (x * y) ^ 2 = norm x ^ 2 * norm y ^ 2" unfolding norm_octo_squared octo_mult_components by algebra alsohave"... = (norm x * norm y) ^ 2" by (simp add: power_mult_distrib) finallyshow ?thesis by simp qed
lemma mult_1_right_octo [simp]: "x * 1 = (x :: octo)" and mult_1_left_octo [simp]: "1 * x = (x :: octo)" by (simp_all add: times_octo_def)
instance octo :: power ..
lemma power2_eq_square_octo: "x ^ 2 = (x * x :: octo)" by (simp add: numeral_2_eq_2 times_octo_def)
lemma octo_product_alternative_left: "x * (x * y) = (x * x :: octo) * y" unfolding octo_eq_iff octo_mult_components by algebra
lemma octo_product_alternative_right: "x * (y * y) = (x * y :: octo) * y" unfolding octo_eq_iff octo_mult_components by algebra
lemma octo_product_flexible: "(x * y) * x = x * (y * x :: octo)" unfolding octo_eq_iff octo_mult_components by algebra
lemma octo_power_commutes: "x ^ y * x = x * (x ^ y :: octo)" by (induction y) (simp_all add: octo_product_flexible)
lemma octo_of_real_diff [simp]: "octo_of_real (x - y) = octo_of_real x - octo_of_real y" by (simp add: octo_of_real_def scaleR_left_diff_distrib)
lemma octo_of_real_mult [simp]: "octo_of_real (x * y) = octo_of_real x * octo_of_real y" using octo_of_real_def by (metis scaleR_conv_octo_of_real scaleR_scaleR)
lemma octo_of_real_sum[simp]: "octo_of_real (sum f s) = (∑x∈s. octo_of_real (f x))" by (induct s rule: infinite_finite_induct) auto
lemma octo_of_real_power [simp]: "octo_of_real (x ^ y) = (octo_of_real x :: octo) ^ y" by (induct y)(simp_all)
lemma octo_of_real_eq_iff [simp]: "octo_of_real x = octo_of_real y ⟷ x = y" using octo_of_real_def by (simp add: octo_of_real_def one_octo.code zero_octo.code)
lemma minus_octo_of_real_eq_octo_of_real_iff [simp]: "-octo_of_real x = octo_of_real y ⟷ -x = y" using octo_of_real_eq_iff[of "-x" y] by (simp only: octo_of_real_minus)
lemma octo_of_real_eq_minus_of_real_iff [simp]: "octo_of_real x = -octo_of_real y ⟷ x = -y" using octo_of_real_eq_iff[of x "-y"] by (simp only: octo_of_real_minus)
lemma octo_of_nat_add [simp]: "octo_of_nat (a + b) = octo_of_nat a + octo_of_nat b" and octo_of_nat_mult [simp]: "octo_of_nat (a * b) = octo_of_nat a * octo_of_nat b" and octo_of_nat_diff [simp]: "b ≤ a ==> octo_of_nat (a - b) = octo_of_nat a - octo_of_nat b" and octo_of_nat_0 [simp]: "octo_of_nat 0 = 0" and octo_of_nat_1 [simp]: "octo_of_nat 1 = 1" and octo_of_nat_Suc_0 [simp]: "octo_of_nat (Suc 0) = 1" by (simp_all add: octo_eq_iff octo_mult_components)
lemma octo_of_int_add [simp]: "octo_of_int (a + b) = octo_of_int a + octo_of_int b" and octo_of_int_mult [simp]: "octo_of_int (a * b) = octo_of_int a * octo_of_int b" and octo_of_int_diff [simp]: "b ≤ a ==> octo_of_int (a - b) = octo_of_int a - octo_of_int b" and octo_of_int_0 [simp]: "octo_of_int 0 = 0" and octo_of_int_1 [simp]: "octo_of_int 1 = 1" by (simp_all add: octo_eq_iff octo_mult_components)
instance octo :: numeral ..
lemma numeral_octo_conv_of_nat: "numeral x = octo_of_nat (numeral x)" proof (induction x) case(Bit0 x) have"numeral x+ numeral x = octo_of_nat(numeral x+ numeral x)" unfolding Bit0.IH octo_of_nat_add .. thus ?caseby (simp add: numeral_Bit0) next case(Bit1 x) have"numeral x+ numeral x + numeral num.One= octo_of_nat (numeral x + numeral x + numeral num.One)" unfolding Bit1.IH octo_of_nat_add by simp thus ?caseby (simp add: numeral_Bit1) qed auto
lemma octo_of_real_inverse [simp]: "octo_of_real (inverse x) = inverse (octo_of_real x )" by (simp add: octo_eq_iff power2_eq_square divide_simps)
lemma nonzero_octo_of_real_divide: "y ≠ 0 ==> octo_of_real (x / y) = (octo_of_real x / octo_of_real y ::octo)" by (simp add: divide_inverse divide_octo_def)
lemma octo_of_real_divide [simp]: "octo_of_real (x / y) = (octo_of_real x / octo_of_real y :: octo)" using divide_inverse divide_octo_def octo_of_real_def octo_of_real_inverse by (metis octo_of_real_mult)
lemma octo_of_real_inverse_collapse [simp]: assumes"c ≠ 0" shows"octo_of_real c * octo_of_real (inverse c) = 1" "octo_of_real (inverse c) * octo_of_real c = 1" using assms by (simp_all add: octo_eq_iff octo_mult_components power2_eq_square)
lemma octo_divide_numeral: fixes x::octo shows"x / numeral y = x /R numeral y" using octo_of_real_times_commute[of "inverse (numeral y)"] by (simp add: scaleR_conv_octo_of_real divide_octo_def flip: octo_of_real_numeral)
lemma cnj_add [simp]: "cnj (x + y) = cnj x + cnj y" using octo_eq_iff inner_real_def of_real_0 of_real_inner_1 by simp
lemma cnj_sum [simp]: "cnj (sum f S) = (∑x∈S. cnj (f x))" by (induct S rule: infinite_finite_induct) auto
lemma cnj_diff [simp]: "cnj (x - y) = cnj x - cnj y" using octo_eq_iff by (metis add.commute add_left_cancel cnj_add diff_add_cancel)
lemma cnj_minus [simp]: "cnj (- x) = - cnj x" using octo_eq_iff cnj_cnj by auto
lemma cnj_inverse [simp]: "cnj (inverse x) = inverse (cnj x)"for x y ::octo using octo_eq_iff inner_real_def real_inner_1_right by auto
lemma cnj_mult [simp]: "cnj (x * y) = cnj y * cnj x"for x y ::octo using octo_eq_iff times_octo_def octo_mult_components cnj_cnj
mult_not_zero nonzero_inverse_mult_distrib by simp
lemma cnj_divide [simp]: "cnj (x / y) = (inverse (cnj y) ) * cnj x" for x y ::octo unfolding divide_octo_def times_octo_def using cnj_inverse cnj_mult octo_mult_components by (metis times_octo_def)
subsubsection‹ Octonionic-specific theorems about sums. ›
lemma Ree_sum [simp]: "Ree (sum f S) = sum (λx. Ree(f x)) S" and Im1_sum [simp]: "Im1 (sum f S) = sum (λx. Im1 (f x)) S" and Im2_sum [simp]: "Im2 (sum f S) = sum (λx. Im2 (f x)) S" and Im3_sum [simp]: "Im3 (sum f S) = sum (λx. Im3 (f x)) S" and Im4_sum [simp]: "Im4 (sum f S) = sum (λx. Im4 (f x)) S" and Im5_sum [simp]: "Im5 (sum f S) = sum (λx. Im5 (f x)) S" and Im6_sum [simp]: "Im6 (sum f S) = sum (λx. Im6 (f x)) S" and Im7_sum [simp]: "Im7 (sum f S) = sum (λx. Im7 (f x)) S" by (induct S rule: infinite_finite_induct; simp)+
subsubsection‹ Bound results for real and imaginary components of limits. ›
lemma Ree_tendsto_upperbound: "[(f ---> limit) net; ∀F x in net. octo.Ree (f x) ≤ b; net ≠ bot]==> Ree limit ≤ b" by (blast intro: tendsto_upperbound [OF tendsto_Re])
lemma Im1_tendsto_upperbound: "[(f ---> limit) net; ∀F x in net. Im1 (f x) ≤ b; net ≠ bot]==> Im1 limit ≤ b" by (blast intro: tendsto_upperbound [OF tendsto_Im1])
lemma Im2_tendsto_upperbound: "[(f ---> limit) net; ∀F x in net. Im2 (f x) ≤ b; net ≠ bot]==> Im2 limit ≤ b" by (blast intro: tendsto_upperbound [OF tendsto_Im2])
lemma Im3_tendsto_upperbound: "[(f ---> limit) net; ∀F x in net. Im3 (f x) ≤ b; net ≠ bot]==> Im3 limit ≤ b" by (blast intro: tendsto_upperbound [OF tendsto_Im3])
lemma Im4_tendsto_upperbound: "[(f ---> limit) net; ∀F x in net. Im4 (f x) ≤ b; net ≠ bot]==> Im4 limit ≤ b" by (blast intro: tendsto_upperbound [OF tendsto_Im4])
lemma Im5_tendsto_upperbound: "[(f ---> limit) net; ∀F x in net. Im5 (f x) ≤ b; net ≠ bot]==> Im5 limit ≤ b" by (blast intro: tendsto_upperbound [OF tendsto_Im5])
lemma Im6_tendsto_upperbound: "[(f ---> limit) net; ∀F x in net. Im6 (f x) ≤ b; net ≠ bot]==> Im6 limit ≤ b" by (blast intro: tendsto_upperbound [OF tendsto_Im6])
lemma Im7_tendsto_upperbound: "[(f ---> limit) net; ∀F x in net. Im7 (f x) ≤ b; net ≠ bot]==> Im7 limit ≤ b" by (blast intro: tendsto_upperbound [OF tendsto_Im7])
lemma Ree_tendsto_lowerbound: "[(f ---> limit) net; ∀F x in net. b ≤ octo.Ree (f x); net ≠ bot]==> b ≤ Ree limit" by (blast intro: tendsto_lowerbound [OF tendsto_Re])
lemma Im1_tendsto_lowerbound: "[(f ---> limit) net; ∀F x in net. b ≤ Im1 (f x); net ≠ bot]==> b ≤ Im1 limit" by (blast intro: tendsto_lowerbound [OF tendsto_Im1])
lemma Im2_tendsto_lowerbound: "[(f ---> limit) net; ∀F x in net. b ≤ Im2 (f x); net ≠ bot]==> b ≤ Im2 limit" by (blast intro: tendsto_lowerbound [OF tendsto_Im2])
lemma Im3_tendsto_lowerbound: "[(f ---> limit) net; ∀F x in net. b ≤ Im3 (f x); net ≠ bot]==> b ≤ Im3 limit" by (blast intro: tendsto_lowerbound [OF tendsto_Im3])
lemma Im4_tendsto_lowerbound: "[(f ---> limit) net; ∀F x in net. b ≤ Im4 (f x); net ≠ bot]==> b ≤ Im4 limit" by (blast intro: tendsto_lowerbound [OF tendsto_Im4])
lemma Im5_tendsto_lowerbound: "[(f ---> limit) net; ∀F x in net. b ≤ Im5 (f x); net ≠ bot]==> b ≤ Im5 limit" by (blast intro: tendsto_lowerbound [OF tendsto_Im5])
lemma Im6_tendsto_lowerbound: "[(f ---> limit) net; ∀F x in net. b ≤ Im6 (f x); net ≠ bot]==> b ≤ Im6 limit" by (blast intro: tendsto_lowerbound [OF tendsto_Im6])
lemma Im7_tendsto_lowerbound: "[(f ---> limit) net; ∀F x in net. b ≤ Im7 (f x); net ≠ bot]==> b ≤ Im7 limit" by (blast intro: tendsto_lowerbound [OF tendsto_Im7])
lemma octo_of_real_continuous [continuous_intros]: "continuous net f ==> continuous net (λx. octo_of_real (f x))" by (auto simp: octo_of_real_def intro: continuous_intros)
lemma octo_of_real_continuous_on [continuous_intros]: "continuous_on S f ==> continuous_on S (λx. octo_of_real (f x))" by (auto simp: octo_of_real_def intro: continuous_intros)
lemma of_real_continuous_iff: "continuous net (λx. octo_of_real (f x)) ⟷ continuous net f" proof safe assume"continuous net (λx. octo_of_real (f x))" hence"continuous net (λx. Ree (octo_of_real (f x)))" by (rule continuous_Ree) thus"continuous net f"by simp qed (auto intro: continuous_intros)
lemma of_real_continuous_on_iff: "continuous_on S (λx. octo_of_real(f x)) ⟷ continuous_on S f" proof safe assume"continuous_on S (λx. octo_of_real (f x))" hence"continuous_on S (λx. Ree (octo_of_real (f x)))" by (rule continuous_on_Ree) thus"continuous_on S f"by simp qed (auto intro: continuous_intros)
subsection‹Octonions for describing 7D isometries›
subsubsection‹The ‹HIm› operator›
definition HIm :: "octo ==> real^7"where "HIm q ≡ vector[Im1 q, Im2 q, Im3 q, Im4 q, Im5 q, Im6 q, Im7 q]"
lemma HIm_Octo: "HIm (Octo w x y z u v q g) = vector[x,y,z, u, v, q, g]" by (simp add: HIm_def)
lemma him_eq: "HIm a = HIm b ⟷ Im1 a = Im1 b ∧ Im2 a = Im2 b ∧ Im3 a = Im3 b ∧ Im4 a = Im4 b ∧ Im5 a = Im5 b ∧ Im6 a = Im6 b ∧ Im7 a = Im7 b"
by (metis HIm_def vector_7)
lemma him_of_real [simp]: "HIm(octo_of_real a) = 0" by (simp add:octo_of_real_eq_Octo HIm_Octo vec_eq_iff vector_def)
lemma him_1 [simp]: "HIm 1 = 0" using HIm_def him_0 by auto
lemma him_cnj: "HIm(cnj q) = - HIm q" by (simp add: HIm_def vec_eq_iff vector_def)
lemma him_mult_left [simp]: "HIm (a *R q) = a *R HIm q" by (simp add: HIm_def vec_eq_iff vector_def)
lemma him_mult_right [simp]: "HIm (q * octo_of_real a) = HIm q * of_real a" by (metis Octonions.scaleR_conv_octo_of_real Real_Vector_Spaces.scaleR_conv_of_real
him_mult_left octo_of_real_times_commute semiring_normalization_rules(7))
lemma him_add [simp]: "HIm (x + y) = HIm x + HIm y" and him_minus [simp]: "HIm (-x) = - HIm x" and him_diff [simp]: "HIm (x - y) = HIm x - HIm y" by (simp_all add: HIm_def vec_eq_iff vector_def)
lemma him_sum [simp]: "HIm (sum f S) = (∑x∈S. HIm (f x))" by (induct S rule: infinite_finite_induct) auto
lemma linear_him: "linear HIm" by (simp add: linearI)
subsubsection‹The ‹Hv› operator›
definition Hv :: "real^7 ==> octo"where "Hv v ≡ Octo 0 (v$1) (v$2) (v$3) (v$4) (v$5) (v$6) (v$7) "
lemma Hv_sel [simp]: "Ree (Hv v) = 0""Im1 (Hv v) = v $ 1""Im2 (Hv v) = v $ 2""Im3 (Hv v) = v $ 3" "Im4 (Hv v) = v $ 4""Im5 (Hv v) = v $ 5""Im6 (Hv v) = v $ 6""Im7 (Hv v) = v $ 7" by (simp_all add: Hv_def)
lemma hv_vec: "Hv(vec r) = Octo 0 r r r r r r r " by (simp add: Hv_def)
lemma hv_eq_zero [simp]: "Hv v = 0 ⟷ v = 0" by (simp add: octo_eq_iff vec_eq_iff) (metis exhaust_7)
lemma hv_zero [simp]: "Hv 0 = 0" by simp
lemma hv_vector [simp]: "Hv(vector[x,y,z,u,v,q,g]) = Octo 0 x y z u v q g" by (simp add: Hv_def)
lemma mult_hv_eq_cross_dot: "Hv x * Hv y = Hv(x ×7 y) - octo_of_real (inner x y)" by (simp add: octo_eq_iff inner_octo_def cross7_components octo_mult_components
inner_vec_def sum_7)
lemma octonion_identity1_cross7 : "Hv (x ×7 y) = (1/2) *R (Hv x * Hv y - Hv y * Hv x)" by (simp add: octo_eq_iff octo_mult_components cross7_components)
lemma octonion_identity2_cross7: "Hv (x ×7 (y ×7 z) + y ×7 (z ×7 x) + z ×7 (x ×7 y)) = -(3/2) *R ((Hv x * Hv y) * Hv z - Hv x * (Hv y * Hv z))" unfolding octo_eq_iff octo_mult_components cross7_components Hv_sel scaleR_octo.sel
vector_add_component minus_octo.sel mult_zero_left mult_zero_right add_0_left
add_0_right diff_0 diff_0_right by algebra
subsection‹ Representing orthogonal transformations as conjugation or congruence with an octonion.›
lemma HIm_nth [simp]: "HIm x $ 1 = Im1 x""HIm x $ 2 = Im2 x""HIm x $ 3 = Im3 x""HIm x $ 4 = Im4 x" "HIm x $ 5 = Im5 x""HIm x $ 6 = Im6 x""HIm x $ 7 = Im7 x" by (simp_all add: HIm_def)
lemma orthogonal_transformation_octo_congruence: assumes"norm q = 1" shows"orthogonal_transformation (λx. HIm(cnj q * Hv x * q))" proof - have nq: "(Ree q)2 + (Im1 q)2 + (Im2 q)2 + (Im3 q)2 + (Im4 q)2 + (Im5 q)2 + (Im6 q)2 + (Im7 q)2 = 1" using assms norm_octo_def by auto have"Vector_Spaces.linear (*R) (*R) (λx. HIm (Octonions.cnj q * Hv x * q))" by unfold_locales (simp_all add: octo_distrib_left octo_distrib_right
octo_mult_scaleR_left octo_mult_scaleR_right) moreoverhave"HIm (Octonions.cnj q * Hv v * q) ∙ HIm (Octonions.cnj q * Hv w * q) = ((Ree q)2 + (Im1 q)2 + (Im2 q)2 + (Im3 q)2+ (Im4 q)2 + (Im5 q)2 + (Im6 q)2 + (Im7 q)2)^2 * (v ∙ w)"for v w unfolding octo_mult_components cnj.sel Hv_sel inner_vec_def sum_7 HIm_nth inner_real_def by algebra ultimatelyshow ?thesis by (simp add: orthogonal_transformation_def linear_def nq) qed
lemma orthogonal_transformation_octo_conjugation: assumes"q ≠ 0" shows"orthogonal_transformation (λx. HIm (inverse q * Hv x * q))" proof - obtain c d where eq: "q = octo_of_real c * d"and1: "norm d = 1" proof show1: "q = octo_of_real (norm q) * (inverse (octo_of_real (norm q)) * q)" using assms norm_eq_zero right_inverse multiplicative_norm_octo by (metis Octonions.scaleR_conv_octo_of_real octo_of_real_inverse scaleR_one scaleR_scaleR) show"norm (inverse (octo_of_real (norm q)) * q) = 1" using assms 1 norm_octo_def norm_mult inverse_octo_1 inverse_octo_1_sym
nonzero_octo_of_real_inverse octo_inverse_eq_cnj
cnj_of_real mult_cancel_left2 multiplicative_norm_octo
norm_eq_zero norm_octo_squared norm_power2_cnj octo_mult_cnj_conv_norm power2_eq_square_octo by metis qed have"c ≠ 0" using assms eq by (metis Octonions.scaleR_conv_octo_of_real scale_zero_left)
thenhave"HIm (Octonions.cnj d * Hv x * d) = HIm (inverse (octo_of_real c * d) * Hv x * (octo_of_real c * d))"for x proof(simp add: flip: octo_inverse_eq_cnj [OF 1] of_real_inverse) assume"c ≠ 0" thenhave"inverse d = inverse d * inverse (c *R 1) * c *R 1" using octo_of_real_def octo_of_real_inverse octo_of_real_inverse_collapse(1)
octo_of_real_times_commute octo_of_real_times_left_commute by force thenhave"inverse d * Hv x * d = inverse (c *R 1 * d) * Hv x * c *R (d * 1)" by (metis (no_types) mult_1_right_octo octo_inverse_mult octo_mult_scaleR_left
octo_mult_scaleR_right) thenshow "HIm (inverse d * Hv x * d) = HIm (inverse (octo_of_real c * d) * Hv x * (octo_of_real c * d))" using octo_mult_scaleR_right octo_of_real_def octo_of_real_times_commute by presburger qed
thenshow ?thesis using orthogonal_transformation_octo_congruence [OF 1] by (simp add: eq) qed
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.