Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/Lie_Groups/   (Sammlung formaler Beweise Version 2026-5©)  Datei vom 31.4.2026 mit Grâße 28 kB image not shown  

Quelle  Algebra_On.thy

  Sprache: Isabelle
 

(*  Title:       Algebra_On
    Author:      Richard Schmoetten <richard.schmoetten@ed.ac.uk>, 2024
    Maintainer:  Richard Schmoetten <richard.schmoetten@ed.ac.uk>
*)


theory Algebra_On
imports
  "HOL-Types_To_Sets.Linear_Algebra_On"
  "Jacobson_Basic_Algebra.Ring_Theory"
begin

section β€ΉAbstract algebra locales over a πŸ‹β€Ήfieldβ€Ίβ€Ί
text β€Ή... with carrier set and some implicit operations
 (only algebraic multiplication, scaling, and derived constants are not implicit).
β€Ί

text β€ΉFor full generality, one could define an algebra as a ring that is also a module
 (rather than a vector space, i.e. have a (non/commutative) base ring instead of a base field).
β€Ί

subsection β€ΉBilinearity, Jacobi identityβ€Ί


lemma (in module_hom_on) mem_hom:
  assumes "x ∈ S1"
  shows "f x ∈ S2"
  using scale[OF assms, of 1] m2.mem_scale[of "f x" 1] m2.scale_one_on[of "f x"oops

locale bilinear_on =
  vector_space_pair_on V W scaleV scaleW +
  vector_space_on X scaleX
  for V:: "'b::ab_group_add set" and W::"'c::ab_group_add set" and X::"'d::ab_group_add set"
    and scaleV::"'a::field==>'b==>'b" (infixr β€ΉπŸ‹Vβ€Ί 75)
    and scaleW::"'a==>'c==>'c" (infixr β€ΉπŸ‹Wβ€Ί 75)
    and scaleX::"'a==>'d==>'d" (infixr β€ΉπŸ‹Xβ€Ί 75) +
  fixes f::"'b==>'c==>'d"
  assumes linearL: "w∈W ==> linear_on V X scaleV scaleX (λv. f v w)"
    and linearR: "v∈V ==> linear_on W X scaleW scaleX (λw. f v w)"
begin

lemma linearL': "[v∈V; w∈W] ==> f (a πŸ‹V v) w = a πŸ‹X (f v w)"
    "[v∈V; v'∈V; w∈W] ==> f (v + v') w = (f v w) + (f v' w)"
  using linearL unfolding linear_on_def module_hom_on_def module_hom_on_axioms_def
  by simp+

lemma linearR': "[v∈V; w∈W] ==> f v (a πŸ‹W w) = a πŸ‹X (f v w)"
    "[v∈V; w∈W; w'∈W] ==> f v (w + w') = (f v w) + (f v w')"
  using linearR unfolding linear_on_def module_hom_on_def module_hom_on_axioms_def
  by simp+

lemma bilinear_zero [simp]:
  shows "w∈W ==> f 0 w = 0" "v∈V ==> f v 0 = 0"
  using linearL'(2) m1.mem_zero linearR'(2) m2.mem_zero by fastforce+

lemma bilinear_uminus [simp]:
  assumes v: "v∈V" and w: "w∈W"
  shows "f (-v) w = - (f v w)" "f v (-w) = - (f v w)"
  using v w linearL'(2) m1.mem_uminus bilinear_zero(1) ab_left_minus add_right_imp_eq apply metis
  using v w linearR'(2) m2.mem_uminus bilinear_zero(2) add_left_cancel add.right_inverse by metis


end


text β€ΉFor bilinear maps, "alternating" means the same as "skew-symmetric",
 which is the same as "anti-symmetric".
β€Ί
locale alternating_bilinear_on = bilinear_on S S S scale scale scale f for S scale f +
  assumes alternating: "x∈S ==> f x x = 0"
begin

lemma antisym:
  assumes "x∈S" "y∈S"
  shows "(f x y) + (f y x) = 0"
proof -
  have "f (x+y) (x+y) = (f x x) + (f x y) + (f y x) + (f y y)"
    using linearL'(2) linearR'(2by (simp add: assms m1.mem_add)
  thus ?thesis
    using alternating by (simp add: assms m1.mem_add)
qed

lemma antisym':
  assumes "x∈S" "y∈S"
  shows "(f x y) = - (f y x)"
  using antisym[OF assms] by (simp add: eq_neg_iff_add_eq_0)

lemma antisym_uminus:
  assumes "x∈S" "y∈S"
  shows "f (-x) y = f y x""f x (-y) = f y x"
  using bilinear_uminus by (metis antisym' assms)+


end


abbreviation (input) jacobi_identity_with::"'a ==> ('a==>'a==>'a) ==> ('a==>'a==>'a) ==> 'a ==> 'a ==> 'a ==> bool"
  where "jacobi_identity_with zero_add f_add f_mult x y z ≑
      zero_add = f_add (f_add (f_mult x (f_mult y z)) (f_mult y (f_mult z x))) (f_mult z (f_mult x y))"

abbreviation (input) jacobi_identity::"('a::{monoid_add}==>'a==>'a) ==> 'a ==> 'a ==> 'a ==> bool"
  where "jacobi_identity f_mult x y z ≑ jacobi_identity_with 0 (+) f_mult x y z"

lemma (in module_hom_on) mapsto_zero: "f 0 = 0"
  using add m1.mem_zero by fastforce

lemma (in module_hom_on) mapsto_uminus: "a∈S1 ==> f (-a) = - f a"
  by (metis add m1.mem_uminus neg_eq_iff_add_eq_0 mapsto_zero)

lemma (in module_hom_on) mapsto_closed: "a∈S1 ==> f a ∈ S2"
  using mapsto_zero add mapsto_uminus
oops


subsection β€ΉUnital and associative algebrasβ€Ί

locale algebra_on = bilinear_on S S S scale scale scale amult
  for S
    and scale :: "'a::field ==> 'b::ab_group_add ==> 'b" (infixr β€Ή*Sβ€Ί 75)
    and amult (infixr β€ΉπŸ‹β€Ί 74) +
  assumes amult_closed [simp]: "a∈S ==> b∈S ==> amult a b ∈ S"
begin

lemma
    shows distR: "[x∈S; y∈S; z∈S] ==> (x+y) πŸ‹ z = x πŸ‹ z + y πŸ‹ z"
      and distL: "[x∈S; y∈S; z∈S] ==> z πŸ‹ (x+y) = z πŸ‹ x + z πŸ‹ y"
      and scalar_compat (* [simp] *): "\<lbrakk>x\<in>S; y\<in>S\<rbrakk> \<Longrightarrow> (a *\<^sub>S x) \<Zspot> (b *\<^sub>S y) = (a*b) *\<^sub>S (x \<Zspot> y)"
    using algebra_on_axioms unfolding algebra_on_def bilinear_on_def bilinear_on_axioms_def
      linear_on_def module_hom_on_def module_hom_on_axioms_def
    by (blast, blast, metis m1.mem_scale m1.scale_scale_on)

  lemma scalar_compat' [simp]:
    shows "[x∈S; y∈S] ==> (a *S x) πŸ‹ y = a *S (x πŸ‹ y)"
      and "[x∈S; y∈S] ==> x πŸ‹ (a *S y) = a *S (x πŸ‹ y)"
      by (simp_all add: linearL' linearR')

end

textβ€Ή
 Sometimes an associative algebra is defined as a ring that is also a module (over a comm. ring),
 with the module and scalar multiplication being compatible, and the ring and module addition being the same.
 That definition implies an associative algebra is also unital, i.e. there is a multiplicative identity;
 in contrast, our definition doesn't. This is in agreement with how a πŸ‹β€Ή'a::ringβ€Ί needs no identity,
 and an additional type class typ>β€Ή'a::ring_1β€Ί is provided (instead of the terminology of rng vs. ring).
β€Ί
locale assoc_algebra_on = algebra_on +
  assumes amult_assoc: "[x∈S; y∈S; z∈S] ==> (xπŸ‹y)πŸ‹z = xπŸ‹(yπŸ‹z)"


locale unital_algebra_on = algebra_on +
  fixes a_id
  assumes amult_id [simp]: "a_id∈S" "a∈S ==> aπŸ‹a_id=a" "a∈S ==> a_idπŸ‹a=a"
begin

  lemma id_neq_0_iff: "βˆƒa∈S. βˆƒb∈S. aβ‰ b ⟷ 0 β‰  a_id"
    using amult_id(1) m1.mem_zero by blast

  lemma id_neq_0_if:
    shows "a∈S ==> b∈S ==> aβ‰ b ==> 0 β‰  a_id"
      and "card S β‰₯ 2 ==> 0 β‰  a_id"
      and "infinite S ==> 0 β‰  a_id"
  proof -

    (* Lifted from HOL-Analysis.Linear_Algebra, which I didn't want to import for one lemma. *)
    have ex_card: "βˆƒSβŠ†A. card S = n"
      if "n ≀ card A"
      for n and A::"'a set"
    proof (cases "finite A")
      case True
      from ex_bij_betw_nat_finite[OF this] obtain f where f: "bij_betw f {0..<card A} A" ..
      moreover from f β€Ήn ≀ card Aβ€Ί have "{..< n} βŠ† {..< card A}" "inj_on f {..< n}"
        by (auto simp: bij_betw_def intro: inj_on_subset)
      ultimately have "f ` {..< n} βŠ† A" "card (f ` {..< n}) = n"
        by (auto simp: bij_betw_def card_image)
      then show ?thesis by blast
    next
      case False
      with β€Ήn ≀ card Aβ€Ί show ?thesis by force
    qed

    show "a∈S ==> b∈S ==> aβ‰ b ==> 0 β‰  a_id"
      using amult_id(2) linearR' m1.mem_zero m1.scale_zero_left by metis
    thus "card S β‰₯ 2 ==> 0 β‰  a_id"
      by (metis amult_id(2) card_2_iff' ex_card m1.mem_zero m1.scale_zero_left scalar_compat'(2) subset_iff)
    thus "infinite S ==> 0 β‰  a_id"
      using infinite_arbitrarily_large
      by (metis amult_id(2) card_2_iff' linearR'(1) m1.mem_zero m1.scale_zero_left subset_iff)
  qed

  lemma id_neq_0_implies_elements (* [simp] *): "\<exists>a\<in>S. \<exists>b\<in>S. a\<noteq>b" if "0 \<noteq> a_id"
    using amult_id(1) m1.mem_zero that by blast

  lemma id_neq_0_implies_card:
    assumes "0 β‰  a_id"
    obtains "card S β‰₯ 2" | "infinite S"
    using id_neq_0_implies_elements[OF assms] unfolding numeral_2_eq_2
    using card_le_Suc0_iff_eq not_less_eq_eq by blast

  lemma id_unique [simp]:
    fixes other_id
    assumes "other_id∈S" "∧a. a∈S ==> aπŸ‹other_id=a ∧ other_idπŸ‹a=a"
    shows "other_id = a_id"
    using assms amult_id by fastforce

end


locale assoc_algebra_1_on = assoc_algebra_on + unital_algebra_on +
  assumes id_neq_0 [simp]: "a_id β‰  0" β€• β€Ήthis is as in the class β€Ήring_1β€Ί, and merely assures β€ΉSβ€Ί has at least two elementsβ€Ί
begin

  lemma is_ring_1_axioms:
    shows "∧a b c. a∈S ==> b∈S ==> c∈S ==> a πŸ‹ b πŸ‹ c = a πŸ‹ (b πŸ‹ c)"
      and "∧a. a∈S ==> a_id πŸ‹ a = a"
      and "∧a. a∈S ==> a πŸ‹ a_id = a"
      and "∧a b c. a∈S ==> b∈S ==> c∈S ==> (a + b) πŸ‹ c = a πŸ‹ c + b πŸ‹ c"
      and "∧a b c. a∈S ==> b∈S ==> c∈S ==> a πŸ‹ (b + c) = a πŸ‹ b + a πŸ‹ c"
      by (simp_all add: distR distL algebra_simps)

  lemma inverse_unique [simp]:
    assumes a: "a∈S" "aβ‰ 0"
      and x: "x∈S" "aπŸ‹x=a_id ∧ xπŸ‹a=a_id"
      and y: "y∈S" "aπŸ‹y=a_id ∧ yπŸ‹a=a_id"
    shows "x = y"
    using amult_assoc[of x a x] amult_assoc[of x a y]
    by (simp add: assms)

  lemma inverse_unique':
    assumes a: "a∈S" "aβ‰ 0"
      and inv_ex: "βˆƒx∈S. aπŸ‹x=a_id ∧ xπŸ‹a=a_id"
    shows "βˆƒ!x∈S. aπŸ‹x=a_id ∧ xπŸ‹a=a_id"
    using a inv_ex inverse_unique by (metis (no_types, lifting)) 

end

lemma algebra_onI [intro]:
  fixes scale :: "'a::field ==> 'b::ab_group_add ==> 'b" (infixr β€Ή*Sβ€Ί 75)
    and amult (infixr β€ΉπŸ‹β€Ί 74)
  assumes "vector_space_on S scale"
    and distR: "∧x y z. [x∈S; y∈S; z∈S] ==> (x+y) πŸ‹ z = x πŸ‹ z + y πŸ‹ z"
    and distL: "∧x y z. [x∈S; y∈S; z∈S] ==> z πŸ‹ (x+y) = z πŸ‹ x + z πŸ‹ y"
    and scalar_compat: "∧a x y. [x∈S; y∈S] ==> (a *S x) πŸ‹ y = a *S (x πŸ‹ y) ∧ x πŸ‹ (a *S y) = a *S (x πŸ‹ y)"
    and closure: "∧x y. [x∈S; y∈S] ==> x πŸ‹ y ∈ S"
  shows "algebra_on S scale amult"
  unfolding algebra_on_def bilinear_on_def vector_space_pair_on_def bilinear_on_axioms_def
  apply (intro conjI algebra_on_axioms.intro, simp_all add: assms(1))
  unfolding linear_on_def module_hom_on_def module_hom_on_axioms_def
  by (auto simp: assms vector_space_on.axioms)


lemma (in vector_space_on) scalar_compat_iff:
  fixes scale_notation (infixr β€Ή*Sβ€Ί 75)
    and amult (infixr β€ΉπŸ‹β€Ί 74)
  defines "scale_notation ≑ scale"
  assumes distR: "∧x y z. [x∈S; y∈S; z∈S] ==> (x+y) πŸ‹ z = x πŸ‹ z + y πŸ‹ z"
    and distL: "∧x y z. [x∈S; y∈S; z∈S] ==> z πŸ‹ (x+y) = z πŸ‹ x + z πŸ‹ y"
  shows "(βˆ€a. βˆ€x∈S. βˆ€y∈S. (a *S x) πŸ‹ y = a *S (x πŸ‹ y) ∧ x πŸ‹ (a *S y) = a *S (x ?? y)) ⟷
      (βˆ€a b. βˆ€x∈S. βˆ€y∈S. (a *S x) πŸ‹ (b *S y) = (a*b) *S (x πŸ‹ y))"
proof (intro iffI)
  { assume asm: "∧a b x y. x∈S ==> y∈S ==> a *S x πŸ‹ b *S y = (a * b) *S (x πŸ‹ y)"
    { fix a x y
      assume S: "x∈S" "y∈S"
      have "a *S x πŸ‹ y = a *S (x πŸ‹ y)" "x πŸ‹ a *S y = a *S (x πŸ‹ y)"
        using asm[of x y a 1] S apply (simp add: scale_notation_def)
        using asm[of x y 1 a] S by (simp add: scale_notation_def) }}
  thus "βˆ€a b. βˆ€x∈S. βˆ€y∈S. a *S x πŸ‹ b *S y = (a * b) *S (x πŸ‹ y) ==>
      βˆ€a. βˆ€x∈S. βˆ€y∈S. a *S x πŸ‹ y = a *S (x πŸ‹ y) ∧ x πŸ‹ a *S y = a *S (x πŸ‹ y)"
    by blast
qed (metis mem_scale scale_notation_def scale_scale_on)


lemma (in vector_space_on) algebra_onI:
  fixes scale_notation (infixr β€Ή*Sβ€Ί 75)
    and amult (infixr β€ΉπŸ‹β€Ί 74)
  defines "scale_notation ≑ scale"
  assumes distR: "∧x y z. [x∈S; y∈S; z∈S] ==> (x+y) πŸ‹ z = x πŸ‹ z + y πŸ‹ z"
    and distL: "∧x y z. [x∈S; y∈S; z∈S] ==> z πŸ‹ (x+y) = z πŸ‹ x + z πŸ‹ y"
    and scalar_compat: "∧a x y. [x∈S; y∈S] ==> (a *S x) πŸ‹ y = a *S (x πŸ‹ y) ∧ x πŸ‹ (a *S y) = a *S (x πŸ‹ y)"
    and closure: "∧x y. [x∈S; y∈S] ==> x πŸ‹ y ∈ S"
  shows "algebra_on S scale amult"
  using algebra_onI[of S scale amult] assms scale_notation_def vector_space_on_axioms by simp


subsection β€ΉLie algebra (locale)β€Ί

text β€Ή
 List syntax interferes with the standard notation for the Lie bracket,
 so it can be disabled it here. Instead, we add a delimiter to the notation for Lie brackets,
 which also helps with unambiguous parsing.
 
β€Ί
(*unbundle no list_syntax and no list_enumeration_syntax*)
(*end*)

locale lie_algebra = algebra_on g scale lie_bracket + alternating_bilinear_on g scale lie_bracket
  for g
    and scale :: "'a::field ==> 'b::ab_group_add ==> 'b" (infixr β€Ή*Sβ€Ί 75)
    and lie_bracket :: "'b ==> 'b ==> 'b" (β€Ή[_;_]β€Ί 74) +
  assumes jacobi: "[x∈g; y∈g; z∈g] ==> 0 = [x;[y;z]] + [y;[z;x]] + [z;[x;y]]"

lemma (in algebra_on) lie_algebraI:
  assumes alternating: "βˆ€x∈S. amult x x = 0"
    and jacobi: "βˆ€x∈S. βˆ€y∈S. βˆ€z∈S. jacobi_identity amult x y z"
  shows "lie_algebra S scale amult"
  apply unfold_locales using assms by auto

lemma (in vector_space_on) lie_algebraI:
  fixes lie_bracket :: "'b ==> 'b ==> 'b" (β€Ή[_;_]β€Ί 74)
    and scale_notation (infixr β€Ή*Sβ€Ί 75)
  defines "scale_notation ≑ scale"
  assumes distributivity:
      "∧x y z. [x∈S; y∈S; z∈S] ==> [(x+y); z] = [x; z] + [y; z] ∧ [z; (x+y)] = [z; x] + [z; y]"
    and scalar_compatibility:
      "∧a x y. [x∈S; y∈S] ==> [(a *S x); y] = a *S ([x; y]) ∧ [x; (a *S y)] = a *S ([x; y])"
    and closure: "∧x y. [x∈S; y∈S] ==> [x; y] ∈ S"
    and alternating: "βˆ€x∈S. lie_bracket x x = 0"
    and jacobi: "βˆ€x∈S. βˆ€y∈S. βˆ€z∈S. jacobi_identity lie_bracket x y z"
  shows "lie_algebra S scale lie_bracket"
  using assms(1,3,6by (auto simp: assms(2,4,5) intro!: algebra_on.lie_algebraI algebra_onI)

context lie_algebra begin

lemma jacobi_alt:
  assumes x: "x∈g" and y: "y∈g" and z: "z∈g"
  shows "[x;[y;z]] = [[x;y];z] + [y;[x;z]]"
proof -
  have "[x;[y;z]] = - ([y;[z;x]]) + (- ([z;[x;y]]))"
    using jacobi[OF assms] add_implies_diff[of "[x;[y;z]]" "[y;[z;x]] + [z;[x;y]]" 0]
    by (simp add: add.commute add.left_commute)
  moreover have "[[x;y];z] = - ([z;[x;y]])" "- ([y;[z;x]]) = [y;[x;z]]"
    using antisym'[OF amult_closed[OF x y] z] antisym'[OF z x] by (simp_all add: assms)
  ultimately show "[x;[y;z]] = [[x;y];z] + [y;[x;z]]" by simp
qed


lemma lie_subalgebra:
  assumes h: "hβŠ†g" "m1.subspace h" and closed: "∧x y. x ∈ h ==> y ∈ h ==> lie_bracket x y ∈ h"
  shows "lie_algebra h scale lie_bracket"
proof -
  interpret h: vector_space_on h scale
    apply unfold_locales
    apply (meson h(1) m1.scale_right_distrib_on subset_iff)
    apply (meson h(1) in_mono m1.scale_left_distrib_on)
    using h(1) m1.scale_scale_on m1.scale_one_on apply auto[2]
    by (simp_all add: h m1.subspace_add m1.subspace_0 m1.subspace_scale)

  show ?thesis
    apply (intro h.lie_algebraI)
    using alternating h(1) jacobi linearL' linearR' by (auto simp: closed subset_iff)
qed

end


subsection β€ΉDivision algebrasβ€Ί

abbreviation (in algebra_on) "is_left_divisor x a b ≑ x ∈ S ∧ a = amult x b"
abbreviation (in algebra_on) "is_right_divisor x a b ≑ x ∈ S ∧ a = amult b x"

locale div_algebra_on = algebra_on +
  fixes divL::"'a==>'a==>'a" (* (infix "/\<^sub>L" 74) *)
    and divR::"'a==>'a==>'a" (* (infix "/\<^sub>R" 74) *)
  assumes divL: "[a∈S; b∈S; bβ‰ 0] ==> is_left_divisor (divL a b) a b"
      "[a∈S; b∈S; bβ‰ 0] ==> is_left_divisor y a b ==> y = (divL a b)"
    and divR: "[a∈S; b∈S; bβ‰ 0] ==> is_right_divisor (divR a b) a b"
      "[a∈S; b∈S; bβ‰ 0] ==> is_right_divisor y a b ==> y = (divR a b)"
begin
text β€Ή In terms of the vocabulary of division rings,
 the expression termβ€Ήa = (divL a b) πŸ‹ bβ€Ί means that termβ€ΉdivL a bβ€Ί is a left divisor of termβ€Ήaβ€Ί,
 and conversely that termβ€Ήaβ€Ί is a right multiple of termβ€ΉdivL a bβ€Ί.
β€Ί
text β€Ή
 For termβ€Ήb=0β€Ί, the divisiors still exist as members of the correct type (necessarily),
 but they have no properties. Similarly for correctly-typed input outside the algebra.
β€Ί

  lemma [simp]:
    assumes "a∈S" "b∈S" "bβ‰ 0"
    shows divL': "divL a b ∈ S" "(divL a b) πŸ‹ b = a" "βˆ€y∈S. a = y πŸ‹ b ⟢ y = divL a b"
      and divR': "divR a b ∈ S" "b πŸ‹ (divR a b) = a" "βˆ€y∈S. a = b πŸ‹ y ⟢ y = divR a b"
    using assms divL divR by simp_all
end

lemma (in algebra_on) div_algebra_onI:
  assumes "βˆ€a∈S. βˆ€b∈S. bβ‰ 0 ⟢ (βˆƒ!x∈S. a=bπŸ‹x) ∧ (βˆƒ!y∈S. a=yπŸ‹b)"
  shows "div_algebra_on S scale amult (λa b. THE y. y∈S ∧ a=yπŸ‹b) (λa b. THE x. x∈S ∧ a=bπŸ‹x)"
proof (unfold div_algebra_on_def div_algebra_on_axioms_def, intro conjI allI impI)
  fix a b x
  assume "a∈S" "b∈S" "bβ‰ 0"
  have exL: "βˆƒ!x∈S. a=xπŸ‹b" by (simp add: β€Ήa ∈ Sβ€Ί β€Ήb ∈ Sβ€Ί β€Ήb β‰  0β€Ί assms)
  from theI'[OF this]
    show L: "(THE y. y ∈ S ∧ a = y πŸ‹ b) ∈ S" "a = (THE y. y ∈ S ∧ a = y πŸ‹ b) πŸ‹ b"
    by simp+
  have exR: "βˆƒ!x∈S. a=bπŸ‹x" by (simp add: β€Ήa ∈ Sβ€Ί β€Ήb ∈ Sβ€Ί β€Ήb β‰  0β€Ί assms)
  from theI'[OF this]
    show R: "(THE x. x ∈ S ∧ a = b πŸ‹ x) ∈ S" "a = b πŸ‹ (THE x. x ∈ S ∧ a = b πŸ‹ x)"
    by simp+
  { assume "x ∈ S ∧ a = x πŸ‹ b"
    thus "x = (THE y. y ∈ S ∧ a = y πŸ‹ b)" using L exL by auto
  } { assume "x ∈ S ∧ a = b πŸ‹ x"
    thus "x = (THE x. x ∈ S ∧ a = b πŸ‹ x)" using R exR by auto
  }
qed (simp add: algebra_on_axioms)

lemma (in assoc_algebra_1_on) div_algebra_onI':
  fixes ainv adivL adivR
  defines "ainv a ≑ (THE x. x∈S ∧ a_id=xπŸ‹a ∧ a_id=aπŸ‹x)"
    and "adivL b a ≑ b πŸ‹ (ainv a)"
    and "adivR b a ≑ (ainv a) πŸ‹ b"
  assumes "βˆ€a∈S. aβ‰ 0 ⟢ (βˆƒx∈S. a_id=xπŸ‹a ∧ a_id=aπŸ‹x)"
  shows "div_algebra_on S scale amult adivL adivR"
proof (unfold_locales)
  fix a b
  assume asm: "a ∈ S" "b ∈ S" "b β‰  0"
  have inv_ex: "βˆƒ!x∈S. a_id=xπŸ‹b ∧ a_id=bπŸ‹x"
    using assms(4) inverse_unique' asm(2,3by metis
  let ?a = "THE x. x ∈ S ∧ a_id = x πŸ‹ b ∧ a_id = b πŸ‹ x"
  from theI'[OF inv_ex] show 1"adivR a b ∈ S ∧ a = b πŸ‹ adivR a b"
    unfolding adivR_def ainv_def apply (intro conjI)
    using asm(1apply simp
    using amult_assoc amult_id(2) asm(1,2) is_ring_1_axioms(2by (metis (no_types, lifting))
  from theI'[OF inv_ex] show 2"adivL a b ∈ S ∧ a = adivL a b πŸ‹ b"
    unfolding adivL_def ainv_def apply (intro conjI)
    apply (simp add: asm(1))
    using amult_assoc asm(1,2) is_ring_1_axioms(3by presburger
  { fix y assume "y ∈ S ∧ a = y πŸ‹ b"
    thus "y = adivL a b"
      by (metis inv_ex 2 amult_assoc asm(2) amult_id(2))
  } { fix y assume "y ∈ S ∧ a = b πŸ‹ y"
    thus "y = adivR a b"
    by (metis 1 amult_assoc asm(2) inv_ex is_ring_1_axioms(2)) }
qed

lemma (in assoc_algebra_on) div_algebra_on_imp_inverse:
  assumes "div_algebra_on S scale amult divL divR" "card S β‰₯ 2 ∨ infinite S"
  shows "βˆƒa_id∈S. (βˆ€a∈S. aπŸ‹a_id=a ∧ a_idπŸ‹a=a) ∧ (βˆ€a∈S. aβ‰ 0 ⟢ divL a_id a = divR a_id a)"
proof -
  obtain x where "xβ‰ 0" "x∈S"
    using assms(2unfolding numeral_2_eq_2
    by (metis card_1_singleton_iff card_gt_0_iff card_le_Suc0_iff_eq insertI1 not_less_eq_eq
      rev_finite_subset subsetI zero_less_Suc)
  let ?id = "divL x x"
  show ?thesis
  proof (intro bexI conjI ballI impI)
    show 1"?id ∈ S"
      using assms unfolding div_algebra_on_def div_algebra_on_axioms_def
      using β€Ήx ∈ Sβ€Ί β€Ήx β‰  0β€Ί by blast
    fix a assume "a∈S"
    show 2"a πŸ‹ ?id = a"
      by (smt (verit) 1 β€Ήa∈Sβ€Ί β€Ήx∈Sβ€Ί β€Ήxβ‰ 0β€Ί amult_assoc amult_closed assms(1) div_algebra_on.divL)
    show 3"?id πŸ‹ a = a"
      by (smt (verit) β€Ήa∈Sβ€Ί β€Ήx∈Sβ€Ί β€Ήxβ‰ 0β€Ί amult_assoc assms(1) div_algebra_on.divL(1) div_algebra_on.divR')
    assume "aβ‰ 0"
    show 4"divL ?id a = divR ?id a"
      by (smt (verit) 1 3 β€Ήa∈Sβ€Ί β€Ήaβ‰ 0β€Ί amult_assoc amult_closed assms(1) div_algebra_on.divL div_algebra_on.divR(2))
  qed
qed

lemma (in assoc_algebra_on) assoc_div_algebra_on_iff:
  assumes "card S β‰₯ 2 ∨ infinite S"
  shows "(βˆƒdivL divR. div_algebra_on S scale amult divL divR) ⟷
      (βˆƒid. unital_algebra_on S scale amult id ∧ (βˆ€a∈S. aβ‰ 0 ⟢ (βˆƒx∈S. aπŸ‹x=id ∧ xπŸ‹a=id)))"
  proof (intro iffI)
    assume "βˆƒid. unital_algebra_on S (*S) (πŸ‹) id ∧ (βˆ€a∈S. a β‰  0 ⟢ (βˆƒx∈S. a πŸ‹ x = id ∧ x πŸ‹ a = id))"
    then obtain id
      where id: "id∈S" "βˆ€a∈S. aπŸ‹id=a ∧ idπŸ‹a=a" and inv: "βˆ€a∈S. aβ‰ 0 ⟢ (βˆƒx∈S. aπŸ‹x=id ∧ xπŸ‹a=id)"
      using unital_algebra_on.amult_id by blast
    then have unital: "unital_algebra_on S scale amult id"
      by (unfold_locales, simp_all)
    then have assoc_alg: "assoc_algebra_1_on S scale amult id"
      unfolding assoc_algebra_1_on_def assoc_algebra_1_on_axioms_def
      using assms unital_algebra_on.id_neq_0_if(2,3) assoc_algebra_on_axioms
      by blast
    show "βˆƒdivL divR. div_algebra_on S (*S) (πŸ‹) divL divR"
      using assoc_algebra_1_on.div_algebra_onI'[OF assoc_alg] inv by fastforce
  next
    assume "βˆƒdivL divR. div_algebra_on S (*S) (πŸ‹) divL divR"
    then obtain divL divR where div_alg: "div_algebra_on S (*S) (πŸ‹) divL divR" by blast
    show "βˆƒid. unital_algebra_on S (*S) (πŸ‹) id ∧ (βˆ€a∈S. a β‰  0 ⟢ (βˆƒx∈S. a πŸ‹ x = id ∧ x πŸ‹ a = id))"
      using div_algebra_on_imp_inverse[OF div_alg assms] unital_algebra_on_axioms.intro assoc_algebra_on_axioms
      unfolding unital_algebra_on_def unital_algebra_on_axioms_def assoc_algebra_on_def
      by (smt (verit) div_alg div_algebra_on.divL(1) div_algebra_on.divR(1))
qed


locale assoc_div_algebra_on =
  assoc_algebra_1_on S scale amult a_id +
  div_algebra_on S scale amult "λa b. amult a (a_inv b)" "λa b. amult (a_inv b) a"
  for S
    and scale :: "'a::field ==> 'b::ab_group_add ==> 'b" (infixr β€Ή*Sβ€Ί 75)
    and amult :: "'b==>'b==>'b" (infixr β€ΉπŸ‹β€Ί 74)
    and a_id  :: 'b(β€Ή1β€Ί)
    and a_inv :: "'b==>'b" (* (\<open>_\<^sup>\<Zspot>\<close> 73) *)
begin
text β€Ή
 The definition πŸ‹β€Ήassoc_div_algebra_onβ€Ί is justified by @{thm assoc_div_algebra_on_iff} above:
 If we have an associative algebra already, the only way it can be a division algebra
 is to be unital as well. Since now left and right divisors can be defined through
 multiplicative inverses, we take only the inverse as a locale parameter, and construct
 the divisors.
 The only case we miss here (due to the requirement termβ€Ήa_idβ‰ 0β€Ί) is the trivial algebra,
 which contains only the zero element (which acts as identity as well). This is for compatibility
 with the standard Isabelle/HOL type classes, which are subclasses of πŸ‹β€Ήzero_neq_oneβ€Ί.
 
β€Ί

  abbreviation (input) divL :: "'b==>'b==>'b"
    where "divL a b ≑ amult a (a_inv b)"

  abbreviation (input) divR :: "'b==>'b==>'b"
    where "divR a b ≑ amult (a_inv b) a"

  lemma div_self_eq_id:
    assumes "a∈S" "aβ‰ 0"
    shows "divL a a = a_id"
      and "divR a a = a_id"
    apply (metis amult_id(1,3) assms divL'(3))
    by (metis amult_id(1,2) assms divR'(3))

end


locale finite_dimensional_assoc_div_algebra_on =
  assoc_div_algebra_on S scale amult a_id a_inv +
  finite_dimensional_vector_space_on S scale basis
  for S :: β€Ή'b::ab_group_add setβ€Ί
    and scale :: β€Ή'a::field ==> 'b ==> 'bβ€Ί  (infixr β€Ή*Sβ€Ί 75)
    and amult :: β€Ή'b==>'b==>'bβ€Ί             (infixr β€ΉπŸ‹β€Ί 74)
    and a_id  :: β€Ή'bβ€Ί                   (β€Ή1β€Ί)
    and a_inv :: β€Ή'b==>'bβ€Ί                (*(\<open>_\<^sup>\<Zspot>\<close> 73)*)
    and basis :: β€Ή'b setβ€Ί


lemma (in assoc_div_algebra_on) finite_dimensional_assoc_div_algebra_onI [intro]:
  fixes basis :: "'b set"
  assumes finite_Basis: "finite basis"
    and independent_Basis: "Β¬ m1.dependent basis"
    and span_Basis: "m1.span basis = S"
    and basis_subset: "basis βŠ† S"
  shows "finite_dimensional_assoc_div_algebra_on S scale amult a_id a_inv basis"
  by (unfold_locales, simp_all add: assms)

end

Messung V0.5 in Prozent
C=88 H=96 G=91

Β€ Dauer der Verarbeitung: 0.22 Sekunden  (vorverarbeitet am  2026-06-10) Β€

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.