An Algebra of Quantum Programs with the Kleene Star Operator Tsubasa Takagi1,2 1 Japan Advanced Institute of Science and Technology, Nomi, Japan 2 Research Fellow of Japan Society for the Promotion of Science Abstract Dynamic Algebra is an algebra that extends the expressive power of Hoare logic and has been used in formal verification of programs. However, quantum programs (programs executed by a quantum computer) behave differently from classical programs. Therefore, it is natural to extend dynamic algebra based on classical logic (Boolean lattice) to quantum dynamic algebra based on quantum logic (complete orthomodular lattice). Nevertheless, quantum dynamical algebra has not been formulated to date because of the difficulty in dealing with repeated execution of quantum programs, which the Kleene star operator represents. In this paper, we formulate an algebra of quantum programs with the Kleene star operator by using an algebraic specification that directly represents the iteration of quantum programs. In addition, we discuss how to construct the algebra from a transition system representing program execution. Keywords Quantum Program, Dynamic Algebra, Orthomodular Lattice, Kripke Frame 1. Introduction Dynamic Quantum Logic (DQL) [1] is a logic for formal verification of quantum programs. Specifically, some quantum protocols, such as Quantum Teleportation [2], Quantum Secret Sharing [2], Quantum Search Algorithm [3], the quantum leader election protocol [3, 4], and the BB84 quantum key distribution protocol [4] have been verified by using DQL (see also [5]). DQL is a dynamical extension of the traditional quantum logic [6], and is based on the idea of propositional dynamic logic (PDL) [7]. By incorporating program constructs π‘Ž; 𝑏 (composition), π‘Ž βˆͺ 𝑏 (non-deterministic choice), 𝑝? (quantum test) into quantum logic as a modal logic, DQL makes it possible to deal with quantum programs. However, the previous studies of DQL have not discussed the Kleene star operator (iteration) of a quantum program. This is because it was not necessary to use the Kleene star operator to construct a prototype of DQL in the earlier stage. Baltag and Smets, the initiators of DQL, stated that β€œNotice that we did not include iteration (Kleene star) among our program constructs: this is only because we do not need it for any of the applications in this paper” in [2]. It does not mean that it is not worth adding the Kleene star operator to DQL. Using the Kleene star operator is necessary to deal with quantum while loops. For example, quantum while loops are used International Workshop on Formal Analysis and Verification of Post-Quantum Cryptographic Protocols 2022 Envelope-Open tsubasa@jaist.ac.jp (T. Takagi) Orcid 0000-0001-9890-1015 (T. Takagi) Β© 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 CEUR Workshop Proceedings (CEUR-WS.org) 2 in the quantum walk algorithm [8] for repeatedly choosing quantum programs corresponding to β€œLeft” or β€œRight.” Moreover, it is significant to discuss the Kleene star operator of quantum programs for connecting DQL to a considerable amount of previous research on finite quantum automata (see [9] for example). In this paper, we define an algebra of regular quantum programs with the Kleene star operator and call it quantum dynamic algebra (QD-algebra). The algebra is constructed by combining the algebra of quantum mechanics (called complete orthomodular lattice) with dynamic algebra [10]. QD-algebra is used for giving algebraic semantics to DQL. However, algebraic semantics is not suited to express a state transition system (in that transitions represent program execution) in general because algebra merely defines various conditions, and the notion of states does not appear explicitly. To overcome this problem, we propose a specific QD-algebra that is associated with a state transition system called a QD-frame (Definition 4.3) and call it a characteristic algebra (Definition 5.5). Characteristic algebra gives relational semantics (namely, Kripke semantics) to DQL. 2. Preliminaries Various algebras for quantum mechanics have already been well studied since 1936 [6]. The starting point for the study of algebra for quantum mechanics is a complete orthomodular lattice that characterizes the lattice of all closed subspaces of a Hilbert space (Theorem 2.3). For more details, see [11]. Definition 2.1. A lattice (𝑃, βͺ―) is a poset that a two-element set {𝑝, π‘ž} has the infimum (greatest lower bound) 𝑝 ∧ π‘ž and supremum (least upper bound) 𝑝 ∨ π‘ž for any 𝑝, π‘ž ∈ 𝑃. A lattice (𝑃, βͺ―) is said to be complete if each subset Ξ“ of 𝑃 has the infimum β‹€ Ξ“ and supremum ⋁ Ξ“. In the sequel, the least element β‹€ 𝑃 and greatest element ⋁ 𝑃 in a complete lattice (𝑃, βͺ―) are denoted as ⋏ and β‹Ž, respectively. Definition 2.2. A complete ortholattice is a triple (𝑃, βͺ―, Β¬) that consists of a complete lattice (𝑃, βͺ―) and function Β¬ ∢ 𝑃 β†’ 𝑃 such that (1) 𝑝 ∧ ¬𝑝 = ⋏, 𝑝 ∨ ¬𝑝 = β‹Ž, (2) ¬¬𝑝 = 𝑝, and (3) 𝑝 βͺ― π‘ž implies π‘ž βͺ― 𝑝, for any 𝑝, π‘ž ∈ 𝑃. A complete orthomodular is a complete ortholattice satisfying the orthomodular law (4) 𝑝 ∧ (¬𝑝 ∨ (𝑝 ∧ π‘ž)) βͺ― π‘ž. Many equivalent definitions of the orthomodular law are known [12, Lemma 19]. One of them is that 𝑝 βͺ― π‘ž implies π‘ž = 𝑝 ∨ (¬𝑝 ∧ π‘ž). 3 Example 2.1 (Powerset Lattice). Let β„˜(𝑆) be the powerset of a set 𝑆. Then, (β„˜(𝑆), βŠ†, 𝑐 ) is a complete orthomodular lattice and is called the powerset lattice of 𝑆, where 𝑐 denotes the set complementation in 𝑆. A powerset lattice is complete because β‹€ Ξ“ = β‹‚π‘βˆˆΞ“ 𝑝 and ⋁ Ξ“ = β‹ƒπ‘βˆˆΞ“ 𝑝 exist for each Ξ“ βŠ† β„˜(𝑆). Hereafter, we shall use the symbols β‹‚ Ξ“ and ⋃ Ξ“ for the infimum and supremum of a set Ξ“ in a powerset lattice, respectively. Example 2.2 (Hilbert Lattice). Let β„‹ be a Hilbert space, and C(β„‹ ) be the set of all closed subspaces of β„‹. Then, (C(β„‹ ), βŠ†, βŸ‚ ) is a complete orthomodular lattice [11, Proposition 4.5] and is called a Hilbert lattice. Here, for each 𝑉 ∈ C(β„‹ ), 𝑉 βŸ‚ is defined as the orthogonal complement {𝑀 ∈ β„‹ ∢ 𝑀 βŸ‚ 𝑣 for any 𝑣 ∈ 𝑉 } of 𝑉, where βŸ‚ denotes the orthogonality relation on β„‹. An orthogonal complement of a closed subspace is always a closed subspace. A Hilbert lattice is complete because β‹€ Ξ“ = β‹‚ Ξ“ and ⋁ Ξ“ = β‹‚{𝑉 ∈ C(β„‹ ) ∢ ⋃ Ξ“ βŠ† 𝑉 } exist for each Ξ“ βŠ† C(β„‹ ). It is known that ⋁ Ξ“ = ((⋃ Ξ“)βŸ‚ )βŸ‚ . Note that the least element β‹€ C(β„‹ ) is the singleton {0} of the zero vector (origin) 0, and the greatest element ⋁ C(β„‹ ) is β„‹. The supremum 𝑉 ∨ π‘Š of {𝑉 , π‘Š } βŠ† C(β„‹ ) is the closed subspace 𝑉 + π‘Š generated by 𝑉 + π‘Š ∢= {𝑣 + 𝑀 ∢ 𝑣 ∈ 𝑉 , 𝑀 ∈ π‘Š }. The following theorem states that the orthomodularity characterizes Hilbert spaces among inner product spaces. Theorem 2.3 (The Amemiya-Araki Theorem [13]). Let 𝑋 be an inner product space. The triple (C(𝑋 ), βŠ†, βŸ‚ ) is a complete orthomodular lattice if and only if 𝑋 is a Hilbert space, where C(𝑋 ) stands for the set of all subspaces of 𝑋 satisfying (𝑋 βŸ‚ )βŸ‚ = 𝑋. Definition 2.4. A complete orthomodular lattice (𝑃, βͺ―, Β¬) is called a complete Boolean lattice if (𝑃, βͺ―) is distributive. That is, the distributive law 𝑝 ∧ (π‘ž ∨ π‘Ÿ) = (𝑝 ∧ π‘ž) ∨ (𝑝 ∧ π‘Ÿ) holds for any 𝑝, π‘ž, π‘Ÿ ∈ 𝑃. For example, a powerset lattice is a complete Boolean lattice, but a Hilbert lattice is not. In fact, a counter-example to the distributive law in a Hilbert lattice is as follows: let 𝑉 , π‘Š be one-dimensional subspaces of β„‹, and π‘ˆ be a one-dimensional subspace of 𝑉 + π‘Š, then π‘ˆ ∩ (𝑉 + π‘Š ) = π‘ˆ β‰  {0} but (π‘ˆ ∩ 𝑉 ) + (π‘ˆ ∩ π‘Š ) = {0} + {0} = {0}. Definition 2.5. A non-empty subset 𝑄 of 𝑃 is called a sublattice of a lattice (𝑃, βͺ―) if π‘βˆ§π‘ž, π‘βˆ¨π‘ž ∈ 𝑄 for any 𝑝, π‘ž ∈ 𝑄. 4 Let Sub(𝒫 ) be the set of all sublattices of a lattice 𝒫 = (𝑃, βͺ―), and βŸ¨π‘‹ ⟩ be the set β‹‚{𝑄 ∈ Sub(𝒫 ) ∢ 𝑋 βŠ† 𝑄} for each non-empty set 𝑋. Then, βŸ¨π‘‹ ⟩ is the smallest sublattice of 𝒫 containing 𝑋 and is called the sublattice of 𝒫 generated by 𝑋. The next theorem tells us when the distributive law partially holds in a complete orthomodular lattice. 𝑝 is said to commute with π‘ž, denoted π‘πΆπ‘ž, if 𝑝 = (𝑝 ∧ π‘ž) ∨ (𝑝 ∧ Β¬π‘ž). Theorem 2.6 (The Foulis-Holland Theorem [14, 15]). Let (𝑃, βͺ―, Β¬) be a (complete) orthomodular lattice. For any 𝑝, π‘ž, π‘Ÿ ∈ 𝑃, π‘πΆπ‘ž and π‘πΆπ‘Ÿ jointly imply that (⟨{𝑝, π‘ž, π‘Ÿ}⟩, βͺ―) is distributive, where ⟨{𝑝, π‘ž, π‘Ÿ}⟩ is the sublattice of (𝑃, βͺ―) generated by {𝑝, π‘ž, π‘Ÿ}. 3. Quantum Dynamic Algebra In this section, we formulate a quantum dynamic algebra (QD-algebra), an algebra of DQL with the Kleene star operator. The QD-algebra specifies all properties (namely, axioms) that DQL is supposed to satisfy. The advantage of using algebra rather than logic is that algebra can naturally express infinitary conjunction and disjunction as infimum and supremum of an infinite set. Infinitary conjunction is used to characterize ⇀(π‘Žβˆ— , 𝑝) in Definition 3.2. The most basic components (called atomic programs) of a quantum program are unitary operators on a given Hilbert space. In this paper, we do not specify unitary operators but instead, deal with them as mere symbols. Thus, no assumptions are imposed on atomic programs henceforth. Regular quantum programs are formed from the atomic programs and elements in the domain of a complete orthomodular lattice by using the program constructs ; (sequential composition), βˆͺ (non-deterministic choice), βˆ— (iteration), and ? (test). These notations are used in Propositional Dynamic Logic (PDL). Definition 3.1. Let Ξ 0 be a set of atomic programs. For any complete ortholattice β„’ = (𝑃, βͺ―, Β¬), the set Ξ β„’ of all regular quantum programs is generated by the grammar Ξ β„’ βˆ‹ π‘Ž ∢∢= skip ∣ abort ∣ πœ‹ ∣ π‘Ž; π‘Ž ∣ π‘Ž βˆͺ π‘Ž ∣ π‘Žβˆ— ∣ 𝑝?, where πœ‹ ∈ Ξ 0 and 𝑝 ∈ 𝑃. Unlike classical programs, the guard clause 𝑝? in the quantum if-then-else program (while-do program) is evaluated in a complete orthomodular lattice that may not be a complete Boolean lattice. That is, (𝑝 ∧ (π‘ž ∨ π‘Ÿ))? β‰  ((𝑝 ∧ π‘ž) ∨ (𝑝 ∧ π‘Ÿ))? in general. Ξ β„’ includes various programs, but the if-then and while-do programs are particularly signif- icant among them. These are defined by if 𝑝 then π‘Ž else 𝑏 ∢= (𝑝?; π‘Ž) βˆͺ (¬𝑝?; 𝑏), 5 while 𝑝 do π‘Ž ∢= (𝑝?; π‘Ž)βˆ— ; ¬𝑝?, which means that the right-hand side of ∢= is abbreviated as the left-hand side of ∢=. It is worth paying attention to a precondition and postcondition of programs to verify them, as Hoare Logic does. A regular quantum program π‘Ž ∈ Ξ β„’ is said to be partially correct with respect to a precondition 𝑝 ∈ 𝑃 and postcondition π‘ž ∈ 𝑃 (denoted {𝑝} π‘Ž {π‘ž}) if, whenever π‘Ž is executed in a state satisfying 𝑝 and it halts in states 𝑠, then π‘ž is satisfied in any such states 𝑠. Because partial correctness does not guarantee that the program halts, the correctness is called partial. We introduce a function ⇀ ∢ Ξ β„’ ×𝑃 β†’ 𝑃 to express the partial correctness: ⇀(π‘Ž, 𝑝) represents the weakest precondition ensuring that 𝑝 will hold after executing π‘Ž. Then, {𝑝} π‘Ž {π‘ž} is expressed as 𝑝 βͺ― ⇀(π‘Ž, π‘ž). This function ⇀ is subject to some conditions described in the following. Definition 3.2. A quantum dynamic algebra (QD-algebra) is a quadruple (𝑃, βͺ―, Β¬, ⇀) that consists of a complete orthomodular lattice (𝑃, βͺ―, Β¬) and function (scalar multiplication) ⇀ ∢ Ξ β„’ Γ— 𝑃 β†’ 𝑃 satisfying the following conditions: (1) ⇀(skip, 𝑝) = 𝑝; (2) ⇀(abort, 𝑝) = β‹Ž; (3) ⇀(π‘Ž, β‹Ž) = β‹Ž; (4) ⇀(π‘Ž, 𝑝 ∧ π‘ž) = ⇀(π‘Ž, 𝑝) ∧ ⇀(π‘Ž, π‘ž); (5) ⇀(π‘Ž; 𝑏, 𝑝) = ⇀(π‘Ž, ⇀(𝑏, 𝑝)); (6) ⇀(π‘Ž βˆͺ 𝑏, 𝑝) = ⇀(π‘Ž, 𝑝) ∧ ⇀(𝑏, 𝑝); (7) ⇀(π‘Žβˆ— , 𝑝) = β‹€{⇀(π‘Žπ‘– , 𝑝) ∢ 𝑖 β‰₯ 0}, where π‘Žπ‘– is defined recursively by π‘Ž0 = skip and π‘Žπ‘–+1 = π‘Žπ‘– ; π‘Ž for each 𝑖 β‰₯ 0; (8) ⇀(𝑝?, π‘ž) = ¬𝑝 ∨ (𝑝 ∧ π‘ž). Note that ⇀(π‘Žβˆ— , 𝑝) exists owing to the completeness of (𝑃, βͺ―, Β¬). The condition (7) of Definition 3.2 is called βˆ—-continuity. Example 3.1 (Powerset Dynamic Algebra). A powerset lattice (β„˜(𝑆), βŠ†, 𝑐 , ⇀) with a function ⇀ satisfying the conditions of Definition 3.2 is a QD-algebra and is called a powerset QD-algebra. Because a power lattice is a complete Boolean lattice, ⇀(𝑝?, π‘ž) = 𝑝 𝑐 βˆͺ π‘ž holds by the distributive law. Thus, ⇀(𝑝, π‘ž) is regarded as the (material) implication in classical logic. Example 3.2 (Hilbert Dynamic Algebra). A Hilbert lattice (C(β„‹ ), βŠ†, βŸ‚ , ⇀) with a function ⇀ satisfying the conditions of Definition 3.2 is a QD-algebra and is called a Hilbert Dynamic algebra. In a Hilbert Dynamic algebra, ⇀(𝑉 ?, π‘Š ) is called the Sasaki hook [16], which is known as the implication in quantum logic. In fact, ⇀(𝑉 ?, π‘Š ) is the inverse image π‘ƒπ‘‰βˆ’1 (π‘Š ) ∢= {𝑣 ∈ β„‹ ∢ 𝑃𝑉 (𝑣) ∈ π‘Š } of π‘Š under the projection 𝑃𝑉 ∢ β„‹ β†’ β„‹ onto 𝑉 [17]. Interpreting a quantum test as a projection is the key idea of DQL [1]. Another significant example of QD-algebra is a characteristic algebra. We define the algebra and prove that a characteristic algebra is a QD-algebra in Section 5. 6 Definition 3.3. Two regular quantum programs π‘Ž, 𝑏 ∈ Ξ β„’ are said to be inseparable, denoted π‘Ž β‰ˆ 𝑏, if ⇀(π‘Ž, 𝑝) = ⇀(𝑏, 𝑝) for any 𝑝 ∈ 𝑃. A QD-algebra is said to be separable if β‰ˆ is the identity relation. That is, π‘Ž β‰ˆ 𝑏 implies π‘Ž = 𝑏. The separability of a QD-algebra (𝑃, βͺ―, Β¬, ⇀) is required for ⇀(π‘Ž, βˆ’) ∢ 𝑃 β†’ 𝑃 to satisfy function extensionality. If not separable, it is possible that ⇀(π‘Ž, 𝑝) = ⇀(𝑏, 𝑝) for any 𝑝 ∈ 𝑃 but ⇀(π‘Ž, βˆ’) β‰  ⇀(𝑏, βˆ’). Theorem 3.4. The following inseparability equations hold. (1) π‘Ž; (𝑏; 𝑐) β‰ˆ (π‘Ž; 𝑏); 𝑐. (2) π‘Ž βˆͺ (𝑏 βˆͺ 𝑐) β‰ˆ (π‘Ž βˆͺ 𝑏) βˆͺ 𝑐. (3) π‘Ž; skip β‰ˆ skip; π‘Ž β‰ˆ π‘Ž. (4) π‘Ž βˆͺ abort β‰ˆ abort βˆͺ π‘Ž β‰ˆ π‘Ž. (5) π‘Ž; (𝑏 βˆͺ 𝑐) β‰ˆ (π‘Ž; 𝑏) βˆͺ (π‘Ž; 𝑐). (6) (π‘Ž βˆͺ 𝑏); 𝑐 β‰ˆ (π‘Ž; 𝑐) βˆͺ (𝑏; 𝑐). (7) π‘Ž βˆͺ 𝑏 β‰ˆ 𝑏 βˆͺ π‘Ž. (8) π‘Ž; abort β‰ˆ abort; π‘Ž β‰ˆ abort. (9) π‘Ž βˆͺ π‘Ž β‰ˆ π‘Ž. (10) skip β‰ˆ β‹Ž?. (11) abort β‰ˆ ⋏?. (12) 𝑝? β‰ˆ if 𝑝 then skip else abort. Proof. Straightforward. It follows from the conditions (1)–(9) that (Ξ β„’ , βˆͺ, ; ) is an idempotent semiring with addition βˆͺ ∢ Ξ β„’ β†’ Ξ β„’ and multiplication ; ∢ Ξ β„’ β†’ Ξ β„’ if (𝑃, βͺ―, Β¬, ⇀) is separable. Evidently, abort is the additive identity, and skip is the multiplicative identity of this semiring. 4. Quantum Dynamic Frame So far, we have not mentioned the notion of states and the relations between them at all. However, it is helpful to intuitively understand the properties of regular quantum programs by representing their execution by relations. An orthoframe (also called an orthogonality space [18]) is used for giving Kripke (or relational) semantics to orthologic (the smallest quantum logic) [19]. Henceforth, we write 𝑠𝑅𝑑̸ for the condition (𝑠, 𝑑) βˆ‰ 𝑅. Definition 4.1. An orthoframe (𝑆, 𝑅) is a pair of a non-empty set 𝑆 of states and relation 𝑅 on 𝑆 that is irreflexive (𝑠𝑅𝑠̸ for any 𝑠 ∈ 𝑆) and symmetric (𝑠𝑅𝑑 implies 𝑑𝑅𝑠 for any 𝑠, 𝑑 ∈ 𝑆). Example 4.1 (Hilbert Frame). Let β„‹ be a Hilbert space, Pure(β„‹ ) be the set of all pure states (unit vectors) in β„‹, and βŸ‚ be the orthogonality relation on β„‹. Then, (Pure(β„‹ ), βŸ‚) is an orthoframe, and is called a Hilbert frame. Note that (β„‹ , βŸ‚) is not an orthoframe because βŸ‚ is not irreflexive. A counter-example is that 0 βŸ‚ 0, where 0 denotes the zero vector (origin) of β„‹. 7 The notion of the orthogonal complement of a closed subspace is generalized as follows: the orthogonal complement 𝑇 βŸ‚ of 𝑇 βŠ† 𝑆 is defined as {𝑠 ∈ 𝑆 ∢ 𝑠𝑅𝑑 for any 𝑑 ∈ 𝑇 }. Here, 𝑇 may be empty, and βˆ…βŸ‚ = 𝑆 by definition. The notion of a closed subspace is also generalized by using the above generalization of an orthogonal complement. Recall that 𝑉 βŠ† β„‹ is a closed subspace if and only if (𝑉 βŸ‚ )βŸ‚ = 𝑉. Definition 4.2. 𝑇 βŠ† 𝑆 is said to be orthoclosed in an orthoframe (𝑆, 𝑅) if (𝑇 βŸ‚ )βŸ‚ = 𝑇. A relation π‘…π‘Ž on 𝑆 can be defined for each π‘Ž ∈ Ξ β„’ by interpreting π‘…π‘Ž as the execution process of a program π‘Ž. That is, π‘ π‘…π‘Ž 𝑑 is intended that 𝑑 is accessible from 𝑠 by executing π‘Ž. For this reason, we extend an orthoframe by adding relations for programs. Definition 4.3. A quantum dynamic frame (QD-frame) is a triple (𝑆, 𝑅, β„›) that consists of an orthoframe (𝑆, 𝑅) and family β„› ∢= {π‘…π‘Ž }π‘ŽβˆˆΞ β„’ of relations on 𝑆 satisfying the following conditions: (1) 𝑠𝑅skip 𝑑 if and only if 𝑠 = 𝑑; (2) 𝑅abort = βˆ…; (3) π‘ π‘…π‘Ž;𝑏 𝑑 if and only if π‘ π‘…π‘Ž 𝑒 and 𝑒𝑅𝑏 𝑑 for some 𝑒 ∈ 𝑆; (4) π‘ π‘…π‘Žβˆͺ𝑏 𝑑 if and only if 𝑠(π‘…π‘Ž βˆͺ 𝑅𝑏 )𝑑; (5) π‘ π‘…π‘Žβˆ— 𝑑 if and only if 𝑠(⋃𝑖β‰₯0 𝑅𝑖 )𝑑, where 𝑅0 ∢= 𝑅skip and 𝑅𝑖+1 ∢= 𝑅𝑖 ; 𝑅 for each 𝑖 β‰₯ 0; (6) 𝑠𝑅𝑝? 𝑑 if and only if 𝑑 ∈ 𝑝 ∧ (¬𝑝 ∨ π‘ž) for any π‘ž satisfying 𝑠 ∈ π‘ž. The above condition of 𝑅𝑝? is borrowed from [20]. Example 4.2 (Hilbert QD-frame). Let {π‘ˆπœ‹ }πœ‹βˆˆΞ 0 be a family of unitary operators (quantum gates) on β„‹. The graph 𝐺(π‘ˆπœ‹ ) of π‘ˆπœ‹ is defined by 𝐺(π‘ˆπœ‹ ) = {(𝑠, π‘ˆπœ‹ (𝑠)) ∢ 𝑠 ∈ Pure(β„‹ )}. Then, for any Hilbert frame (Pure(β„‹ ), βŸ‚), the QD-frame (Pure(β„‹ ), βŸ‚, β„›), called a Hilbert QD-frame, is uniquely constructed from {π‘…πœ‹ }πœ‹βˆˆΞ 0 = {𝐺(π‘ˆπœ‹ )}πœ‹βˆˆΞ 0 . Among various QD-frames, those satisfying the following properties are of particular signifi- cance. Definition 4.4. β€’ A QD-frame (𝑆, 𝑅, β„›) is said to be self-adjoint if 𝑅𝑝? is self-adjoint for each 𝑝 ∈ 𝑃: for any 𝑠, 𝑑, 𝑒 ∈ 𝑆, 𝑠𝑅𝑝? 𝑑 and 𝑑𝑅𝑒̸ jointly imply that 𝑒𝑅𝑝? 𝑣 and 𝑠𝑅𝑣̸ for some 𝑣 ∈ 𝑆. β€’ A QD-frame (𝑆, 𝑅, β„›) is said to be orthostable if for any 𝑠, 𝑑 ∈ 𝑆 and πœ‹ ∈ Ξ 0 , π‘ π‘…πœ‹ 𝑑 implies that there exists 𝑒 ∈ 𝑆 such that 𝑠𝑅𝑒̸ and for any 𝑣 ∈ 𝑆, 𝑒𝑅𝑣̸ implies π‘£π‘…πœ‹ 𝑑. The self-adjointness of a frame is also defined in [21] and [20] for different kinds of frames. The self-adjointness of a quantum transition frame is defined in [21], and that of a DO-frame is defined in [20]. 8 5. Characteristic Algebra Now we construct a characteristic algebra from a QD-frame (orthoframe). Moreover, we prove that a characteristic algebra of an orthostable self-adjoint QD-frame is a QD-algebra. Before embarking on this proof, we show that a characteristic algebra of an orthoframe is an ortholattice. Definition 5.1. A characteristic algebra 𝐢(β„± ) of an orthoframe β„± = (𝑆, 𝑅) is a triple (𝑃ℱ , βŠ†, ¬𝑅 ) that consists of the set 𝑃ℱ of all orthoclosed sets in β„±, set inclusion relation βŠ† on 𝑃ℱ , and function ¬𝑅 ∢ 𝑃ℱ β†’ 𝑃ℱ such that ¬𝑅 𝑝 = {𝑠 ∈ 𝑆 ∢ 𝑠𝑅𝑑 for any 𝑑 ∈ 𝑝}. Note that ¬𝑅 𝑝 = 𝑝 βŸ‚ by the definition of βŸ‚ . Hence, ¬𝑅 ¬𝑅 (¬𝑅 𝑝) = ¬𝑅 (¬𝑅 ¬𝑅 𝑝) = ¬𝑅 𝑝 if 𝑝 ∈ 𝑃ℱ . In other words, ¬𝑅 𝑝 ∈ 𝑃ℱ if 𝑝 ∈ 𝑃ℱ . This guarantees that ¬𝑅 ∢ 𝑃ℱ β†’ 𝑃ℱ is well-defined. Lemma 5.2. 𝑃ℱ is a topped intersection structure on 𝑆: (1) β‹‚ Ξ“ ∈ 𝑃ℱ for any Ξ“ βŠ† 𝑃ℱ , and (2) 𝑆 ∈ 𝑃ℱ . Proof. (1) We only prove the case that the number of elements in Ξ“ is 2. The general case is obtained by a similar argument. Suppose that ¬𝑅 ¬𝑅 𝑝 = 𝑝 and ¬𝑅 ¬𝑅 π‘ž = π‘ž. Then, it suffices to show that ¬𝑅 ¬𝑅 (𝑝 ∩ π‘ž) = 𝑝 ∩ π‘ž. For the βŠ†-part, suppose by contradiction that 𝑠 ∈ ¬𝑅 ¬𝑅 (𝑝 ∩ π‘ž) but 𝑠 βˆ‰ 𝑝 ∩ π‘ž. Then, either 𝑠 βˆ‰ 𝑝 or 𝑠 βˆ‰ π‘ž. Without loss of generality, we can assume 𝑠 βˆ‰ 𝑝, and thus 𝑠 βˆ‰ ¬𝑅 ¬𝑅 𝑝. In other words, 𝑠𝑅𝑑̸ for some 𝑑 ∈ ¬𝑅 𝑝. Hence, 𝑠𝑅𝑑̸ and 𝑑𝑅𝑒 for any 𝑒 ∈ 𝑝. By strengthening the condition of 𝑒, we can state that 𝑠𝑅𝑑̸ and 𝑑𝑅𝑒 for any 𝑒 ∈ 𝑝 ∩ π‘ž. It is equivalent to say that 𝑠𝑅𝑑̸ and 𝑑 ∈ ¬𝑅 (𝑝 ∩ π‘ž). However, the supposition 𝑠 ∈ ¬𝑅 ¬𝑅 (𝑝 ∩ π‘ž) means that 𝑠𝑅𝑒 for any 𝑒 ∈ ¬𝑅 (𝑝 ∩ π‘ž), which leads to a contradiction. The βŠ‡-part is proved as follows: 𝑠 ∈ 𝑝 ∩ π‘ž ⇔ 𝑠 ∈ Β¬ 𝑅 ¬𝑅 𝑝 ∩ Β¬ 𝑅 ¬𝑅 π‘ž ⇔ βˆ€π‘‘ ∈ 𝑆 (𝑑 ∈ ¬𝑅 𝑝 β‡’ 𝑠𝑅𝑑) and βˆ€π‘‘ ∈ 𝑆 (𝑑 ∈ ¬𝑅 π‘ž β‡’ 𝑠𝑅𝑑) ⇔ βˆ€π‘‘ ∈ 𝑆 ((𝑑 ∈ ¬𝑅 𝑝 β‡’ 𝑠𝑅𝑑) and (𝑑 ∈ ¬𝑅 π‘ž β‡’ 𝑠𝑅𝑑)) ⇔ βˆ€π‘‘ ∈ 𝑆 ((𝑑 ∈ ¬𝑅 𝑝 or 𝑑 ∈ ¬𝑅 π‘ž) β‡’ 𝑠𝑅𝑑) ⇔ βˆ€π‘‘ ∈ 𝑆 ((βˆ€π‘’ ∈ 𝑆 (𝑒 ∈ 𝑝 β‡’ 𝑑𝑅𝑒) or βˆ€π‘’ ∈ 𝑆 (𝑒 ∈ π‘ž β‡’ 𝑑𝑅𝑒)) β‡’ 𝑠𝑅𝑑) β‡’ βˆ€π‘‘ ∈ 𝑆 ((βˆ€π‘’ ∈ 𝑆 (𝑒 ∈ 𝑝 β‡’ 𝑑𝑅𝑒, or 𝑒 ∈ π‘ž β‡’ 𝑑𝑅𝑒)) β‡’ 𝑠𝑅𝑑) ⇔ βˆ€π‘‘ ∈ 𝑆 ((βˆ€π‘’ ∈ 𝑆, 𝑒 ∈ 𝑝 and 𝑒 ∈ π‘ž β‡’ 𝑑𝑅𝑒) β‡’ 𝑠𝑅𝑑) ⇔ βˆ€π‘‘ ∈ 𝑆 ((βˆ€π‘’ ∈ 𝑝 ∩ π‘ž, 𝑑𝑅𝑒) β‡’ 𝑠𝑅𝑑) ⇔ 𝑠 ∈ ¬𝑅 ¬𝑅 (𝑝 ∩ π‘ž). 9 (2) It suffices to show that ¬𝑅 ¬𝑅 𝑆 = 𝑆. It follows from (i) 𝑆 βŸ‚ = βˆ… and (ii) βˆ…βŸ‚ = 𝑆. (i) follows because no 𝑠 ∈ 𝑆 satisfies that 𝑠𝑅𝑑 for any 𝑑 ∈ 𝑆. If there would be such 𝑠, then 𝑠𝑅𝑠 but 𝑅 is irreflexive by definition, a contradiction. (ii) is immediate. In general, a topped intersection structure ordered by inclusion is a complete lattice [22, Corollary 2.32]. Thus, the following corollary is obtained. Corollary 5.3. (𝑃ℱ , βŠ†) is a complete lattice, where the infimum and supremum of Ξ“ βŠ† 𝑃ℱ in (𝑃ℱ , βŠ†) are β‹‚ Ξ“ and the smallest orthoclosed set ⨄ Ξ“ containing ⋃ Ξ“, respectively. Symbolically, ⨄ Ξ“ ∢= β‹‚{𝑝 ∈ 𝑃ℱ ∢ ⋃ Ξ“ βŠ† 𝑝}. We shall denote by 𝑝 ⊎ π‘ž the supremum of {𝑝, π‘ž}. Theorem 5.4. 𝐢(β„± ) = (𝑃ℱ , βŠ†, ¬𝑅 ) is a complete ortholattice. Proof. By Corollary 5.3, (𝑃ℱ , βŠ†) is a complete lattice. The conditions (1)–(3) of an ortholattice lattice (Definition 2.2) are proved as follows. (1) Proof of 𝑝 ∩ ¬𝑅 𝑝 = βˆ… and 𝑝 ⊎ ¬𝑅 𝑝. Suppose for the sake of contradiction that 𝑠 ∈ 𝑝 ∩ ¬𝑅 𝑝. Then, 𝑠 ∈ 𝑝 and 𝑠 ∈ ¬𝑅 𝑝, and thus 𝑠𝑅𝑠 but it contradicts to the condition that 𝑅 is irreflexive. Hence, 𝑝 ∩ ¬𝑅 𝑝 = βˆ…. (2) Proof of ¬𝑅 ¬𝑅 𝑝 = 𝑝. It immediately follows from 𝑝 ∈ 𝑃ℱ . (3) Proof of 𝑝 βŠ† π‘ž implies ¬𝑅 π‘ž βŠ† ¬𝑅 𝑝. Suppose that 𝑝 βŠ† π‘ž and 𝑠 ∈ ¬𝑅 π‘ž. Then, 𝑑 ∈ 𝑝 implies 𝑑 ∈ π‘ž, and 𝑑 ∈ π‘ž implies 𝑠𝑅𝑑. Thus, 𝑑 ∈ 𝑝 implies 𝑠𝑅𝑑, which is equivalent to 𝑠 ∈ ¬𝑅 𝑝. Consequently, 𝑝 βŠ† π‘ž implies ¬𝑅 π‘ž βŠ† ¬𝑅 𝑝. The notion of characteristic algebra of an orthoframe is extended to that of an orthostable self-adjoint QD-frame. Because 𝐢(β„± ) is a complete ortholattice by Theorem 5.4, Π𝐢(β„± ) is well-defined. Definition 5.5. Let β„± = (𝑆, 𝑅) be an orthoframe. A characteristic algebra 𝐢(β„±β„› ) of an orthostable self-adjoint QD-frame β„±β„› = (𝑆, 𝑅, β„›) is a quadruple (𝑃ℱ , βŠ†, ¬𝑅 , ⇀ℛ ) that consists of the set 𝑃ℱ of all orthoclosed sets in β„±, set inclusion relation βŠ† on 𝑃ℱ , and functions ¬𝑅 ∢ 𝑃ℱ β†’ 𝑃ℱ and ⇀ℛ ∢ Π𝐢(β„± ) Γ— 𝑃ℱ β†’ 𝑃ℱ such that (1) ¬𝑅 𝑝 = 𝑝 βŸ‚ , which means ¬𝑅 𝑝 = {𝑠 ∈ 𝑆 ∢ 𝑠𝑅𝑑 for any 𝑑 ∈ 𝑝}, and (2) ⇀ℛ (π‘Ž, 𝑝) = {𝑠 ∈ 𝑆 ∢ 𝑑 ∈ 𝑝 for any 𝑑 ∈ 𝑆 satisfying π‘ π‘…π‘Ž 𝑑}. It is not obvious that there exist ⇀ℛ (π‘Ž, 𝑝) in 𝑃ℱ for any 𝑝 ∈ 𝑃ℱ and π‘Ž ∈ Ξ β„’ . Before proving this, we show some lemmas. Lemma 5.6. (1) ⇀ℛ (skip, 𝑝) = 𝑝. 10 (2) ⇀ℛ (abort, 𝑝) = 𝑆. (3) ⇀ℛ (π‘Ž; 𝑏, 𝑝) = ⇀ℛ (π‘Ž, ⇀ℛ (𝑏, 𝑝)). (4) ⇀ℛ (π‘Ž βˆͺ 𝑏, 𝑝) = ⇀ℛ (π‘Ž, 𝑝) ∩ ⇀ℛ (𝑏, 𝑝). (5) ⇀ℛ (π‘Žβˆ— , 𝑝) = β‹‚{⇀ℛ (π‘Žπ‘– , 𝑝) ∢ 𝑖 β‰₯ 0}. Proof. (1) Proof of ⇀ℛ (skip, 𝑝) = 𝑝. ⇀ℛ (skip, 𝑝) = {𝑠 ∈ 𝑆 ∢ 𝑑 ∈ 𝑝 for any 𝑑 ∈ 𝑆 satisfying 𝑠𝑅skip 𝑑} = {𝑠 ∈ 𝑆 ∢ 𝑠 ∈ 𝑝 for any 𝑠 ∈ 𝑆} = 𝑝. (2) Proof of ⇀ℛ (abort, 𝑝) = 𝑆. ⇀ℛ (abort, 𝑝) = {𝑠 ∈ 𝑆 ∢ 𝑑 ∈ 𝑝 for any 𝑑 ∈ 𝑆 satisfying 𝑠𝑅abort 𝑑} = 𝑆. (3) Proof of ⇀ℛ (π‘Ž; 𝑏, 𝑝) = ⇀ℛ (π‘Ž, ⇀ℛ (𝑏, 𝑝)). ⇀ℛ (π‘Ž; 𝑏, 𝑝) = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (βˆƒπ‘’ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑒 and 𝑒𝑅𝑏 𝑑) β‡’ 𝑑 ∈ 𝑝)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (βˆ€π‘’ ∈ 𝑆 not (π‘ π‘…π‘Ž 𝑒 and 𝑒𝑅𝑏 𝑑) or 𝑑 ∈ 𝑝)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆, βˆ€π‘’ ∈ 𝑆 (not (π‘ π‘…π‘Ž 𝑒 and 𝑒𝑅𝑏 𝑑) or 𝑑 ∈ 𝑝)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘’ ∈ 𝑆, βˆ€π‘‘ ∈ 𝑆 (not (π‘ π‘…π‘Ž 𝑒 and 𝑒𝑅𝑏 𝑑) or 𝑑 ∈ 𝑝)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘’ ∈ 𝑆, βˆ€π‘‘ ∈ 𝑆 (not π‘ π‘…π‘Ž 𝑒 or not 𝑒𝑅𝑏 𝑑 or 𝑑 ∈ 𝑝)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘’ ∈ 𝑆 (not π‘ π‘…π‘Ž 𝑒 or βˆ€π‘‘ ∈ 𝑆 (not 𝑒𝑅𝑏 𝑑 or 𝑑 ∈ 𝑝))} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘’ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑒 β‡’ βˆ€π‘‘ ∈ 𝑆 (𝑒𝑅𝑏 𝑑 β‡’ 𝑑 ∈ 𝑝))} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘’ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑒 β‡’ 𝑒 ∈ ⇀ℛ (𝑏, 𝑝))} = ⇀ℛ (π‘Ž, ⇀ℛ (𝑏, 𝑝)). (4) Proof of ⇀ℛ (π‘Ž βˆͺ 𝑏, 𝑝) = ⇀ℛ (π‘Ž, 𝑝) ∩ ⇀ℛ (𝑏, 𝑝). ⇀ℛ (π‘Ž βˆͺ 𝑏, 𝑝) = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (𝑠(π‘…π‘Ž βˆͺ 𝑅𝑏 )𝑑 β‡’ 𝑑 ∈ 𝑝)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑑 or 𝑠𝑅𝑏 𝑑 β‡’ 𝑑 ∈ 𝑝)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 ((π‘ π‘…π‘Ž 𝑑 β‡’ 𝑑 ∈ 𝑝) and (𝑠𝑅𝑏 𝑑 β‡’ 𝑑 ∈ 𝑝))} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑑 β‡’ 𝑑 ∈ 𝑝) and βˆ€π‘‘ ∈ 𝑆 (𝑠𝑅𝑏 𝑑 β‡’ 𝑑 ∈ 𝑝)} = ⇀ℛ (π‘Ž, 𝑝) ∩ ⇀ℛ (𝑏, 𝑝). (5) Proof of ⇀ℛ (π‘Žβˆ— , 𝑝) = β‹‚{⇀ℛ (π‘Žπ‘– , 𝑝) ∢ 𝑖 β‰₯ 0}. ⇀ℛ (π‘Žβˆ— , 𝑝) = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (𝑠(⋃𝑖β‰₯0 π‘…π‘Žπ‘– )𝑑 β‡’ 𝑑 ∈ 𝑝)} = β‹‚{⇀ℛ (π‘Žπ‘– , 𝑝) ∢ 𝑖 β‰₯ 0} is obtained in a similar way as in the case of π‘Ž βˆͺ 𝑏. 11 The following proof of Lemma 5.7 is attributed to the work of [20] by changing the notations. Lemma 5.7. If (𝑆, 𝑅, β„›) is self-adjoint, then (1) 𝑠 ∈ 𝑝 implies that 𝑠𝑅𝑝? 𝑠, and (2) ⇀ℛ (𝑝?, π‘ž) = ¬𝑅 𝑝 ⊎ (𝑝 ∩ π‘ž). Proof. (1) If 𝑠 ∈ π‘ž, then 𝑠 ∈ ¬𝑅 𝑝 βˆͺ π‘ž βŠ† ¬𝑅 𝑝 ⊎ π‘ž. Thus, 𝑠 ∈ 𝑝 and 𝑠 ∈ π‘ž jointly imply that 𝑠 ∈ 𝑝 ∩ (¬𝑅 𝑝 ⊎ π‘ž). That is, 𝑠𝑅𝑝? 𝑠. (2) For the βŠ†-part, suppose that 𝑠 βˆ‰ ¬𝑅 (𝑝 ∩ ¬𝑅 (𝑝 ∩ π‘ž)). Then, there exists 𝑑 ∈ 𝑆 such that (⋆) 𝑑 ∈ 𝑝 ∩ ¬𝑅 (𝑝 ∩ π‘ž) but 𝑠𝑅𝑑.ΜΈ Thus, 𝑑𝑅𝑝? 𝑑 by 𝑑 ∈ 𝑝 (Lemma 5.7 (1)). Because 𝑑𝑅𝑝? 𝑑 and 𝑑𝑅𝑠̸ (the symmetry of 𝑅 ΜΈ follows from that of 𝑅), it follows from the self-adjointness of 𝑅𝑝? that 𝑠𝑅𝑝? 𝑒 and 𝑑𝑅𝑒̸ for some 𝑒 ∈ 𝑆. 𝑅𝑝? 𝑑 /𝑑 𝑅̸ 𝑅̸ ✏ 𝑅𝑝? ✏ βˆƒπ‘’ o 𝑠 By (⋆), 𝑑 ∈ ¬𝑅 (𝑝 ∩ π‘ž). That is, 𝑑𝑅𝑣̸ implies 𝑣 βˆ‰ 𝑝 ∩ π‘ž for any 𝑣 ∈ 𝑆. Hence, 𝑒 βˆ‰ 𝑝 ∩ π‘ž by 𝑑𝑅𝑒.ΜΈ It implies that 𝑒 βˆ‰ 𝑝 or 𝑒 βˆ‰ π‘ž but the former must be false by 𝑠𝑅𝑝? 𝑒. Therefore, 𝑒 βˆ‰ π‘ž is obtained. It means that 𝑠𝑅𝑝? 𝑒 and 𝑒 βˆ‰ π‘ž for some 𝑒 ∈ 𝑆. Equivalently, 𝑠 βˆ‰ ⇀ℛ (𝑝?, π‘ž). For the βŠ‡-part, suppose that 𝑠 βˆ‰ ⇀ℛ (𝑝?, π‘ž). Then, there exists 𝑑 ∈ 𝑆 such that 𝑠𝑅𝑝? 𝑑 but 𝑑 βˆ‰ π‘ž. Thus, 𝑑 βˆ‰ ¬𝑅 ¬𝑅 π‘ž by π‘ž ∈ 𝑃ℱ . Hence, 𝑒 ∈ ¬𝑅 π‘ž but 𝑑𝑅𝑒̸ for some 𝑒 ∈ 𝑆. Because 𝑠𝑅𝑝? 𝑑 and 𝑑𝑅𝑒,ΜΈ it follows from the self-adjointness of 𝑅𝑝? that 𝑒𝑅𝑝? 𝑣 and 𝑠𝑅𝑣̸ for some 𝑣 ∈ 𝑆. 𝑅𝑝? 𝑠 /𝑑 𝑅̸ 𝑅̸ ✏ 𝑅𝑝? ✏ βˆƒπ‘£ o 𝑒 Therefore, 𝑣 ∈ 𝑝 ∩ (¬𝑅 𝑝 ⊎ ¬𝑅 π‘ž) by 𝑒𝑅𝑝? 𝑣 and 𝑒 ∈ ¬𝑅 π‘ž. Consequently, it follows from 𝑠𝑅𝑣̸ that 𝑠 βˆ‰ ¬𝑅 (𝑝 ∩ (¬𝑅 𝑝 ⊎ ¬𝑅 π‘ž)) = ¬𝑅 𝑝 ⊎ (¬𝑅 ¬𝑅 𝑝 ∩ ¬𝑅 ¬𝑅 π‘ž) = ¬𝑅 𝑝 ⊎ (𝑝 ∩ π‘ž). Theorem 5.8. If (𝑆, 𝑅, β„›) is an orthostable self-adjoint QD-frame, then 𝑃ℱ is closed under ⇀ℛ : 𝑝 ∈ 𝑃ℱ implies ⇀ℛ (π‘Ž, 𝑝) ∈ 𝑃ℱ for each π‘Ž ∈ Ξ β„’ . Proof. We prove by structural induction on π‘Ž ∈ Ξ β„’ . (1) The base cases, namely π‘Ž = skip, π‘Ž = abort, or π‘Ž = πœ‹ ∈ Ξ 0 . For π‘Ž = skip, ⇀ℛ (skip, 𝑝) = 𝑝 ∈ 𝑃ℱ by Lemma 5.6 (1). For π‘Ž = abort, ⇀ℛ (abort, 𝑝) = 𝑆 ∈ 𝑃ℱ by Lemma 5.6 (2) and Lemma 5.2 (2). For π‘Ž = πœ‹ ∈ Ξ 0 , it suffices to show that ¬𝑅 ¬𝑅 ⇀ℛ (πœ‹, 𝑝) = ⇀ℛ (πœ‹, 𝑝). 12 For the βŠ†-part, suppose that 𝑠 ∈ ¬𝑅 ¬𝑅 ⇀ℛ (πœ‹, 𝑝). Then, 𝑠 ∈ ¬𝑅 ¬𝑅 ⇀ℛ (πœ‹, 𝑝) ⇔ βˆ€π‘‘ ∈ 𝑆 ((βˆ€π‘’ ∈ ⇀ℛ (πœ‹, 𝑝), 𝑑𝑅𝑒) β‡’ 𝑠𝑅𝑑) ⇔ βˆ€π‘‘ ∈ 𝑆 ((βˆ€π‘’ ∈ 𝑆 ((βˆ€π‘£ ∈ 𝑆 (π‘’π‘…πœ‹ 𝑣 β‡’ 𝑣 ∈ 𝑝)) β‡’ 𝑑𝑅𝑒)) β‡’ 𝑠𝑅𝑑) ⇔ βˆ€π‘‘ ∈ 𝑆 (𝑠𝑅𝑑̸ β‡’ βˆƒπ‘’ ∈ 𝑆 (βˆ€π‘£ ∈ 𝑆 (π‘’π‘…πœ‹ 𝑣 β‡’ 𝑣 ∈ 𝑝) and 𝑑𝑅𝑒)) ΜΈ (I) Assume that π‘ π‘…πœ‹ 𝑑, and then we prove 𝑑 ∈ 𝑝 to show 𝑠 ∈ ⇀ℛ (πœ‹, 𝑝). Because (𝑆, 𝑅, β„›) is orthostable, there exists 𝑒 β€² ∈ 𝑆 such that (II) 𝑠𝑅𝑒̸ β€² and (III) βˆ€π‘£ ∈ 𝑆 (𝑒 β€² 𝑅𝑣̸ β‡’ π‘£π‘…πœ‹ 𝑑). By (I) and (II), there exists 𝑒 ∈ 𝑆 such that (IV) βˆ€π‘£ ∈ 𝑆 (π‘’π‘…πœ‹ 𝑣 β‡’ 𝑣 ∈ 𝑝) and (V) 𝑒 β€² 𝑅𝑒.ΜΈ By (III) and (V), π‘’π‘…πœ‹ 𝑑. Therefore, 𝑑 ∈ 𝑝 by (IV). We then prove the βŠ‡-part. Because 𝑅 is symmetric, 𝑅 ΜΈ is also symmetric. Thus, it suffices to show that βˆ€π‘‘ ∈ 𝑆 (𝑠𝑅𝑑̸ β‡’ βˆƒπ‘’ ∈ 𝑆 (𝑒 ∈ ⇀ℛ (πœ‹, 𝑝) and 𝑒𝑅𝑑)). ΜΈ It is satisfied by choosing 𝑠 as 𝑒 if 𝑠 ∈ ⇀ℛ (πœ‹, 𝑝). (2) The case of π‘Ž = 𝑏; 𝑐. ⇀ℛ (π‘Ž; 𝑏, 𝑝) = ⇀ℛ (π‘Ž, ⇀ℛ (𝑏, 𝑝)) ∈ 𝑃ℱ by Lemma 5.6 (3) and the induction hypothesis. (3) The case of π‘Ž = 𝑏 βˆͺ 𝑐. ⇀ℛ (π‘Ž βˆͺ 𝑏, 𝑝) = ⇀ℛ (π‘Ž, 𝑝) ∩ ⇀ℛ (𝑏, 𝑝) ∈ 𝑃ℱ by Lemma 5.6 (4), Lemma 5.2 (1), and the induction hypothesis. (4) The case of π‘Ž = 𝑏 βˆ— . ⇀ℛ (π‘Žβˆ— , 𝑝) = β‹‚{⇀ℛ (π‘Žπ‘– , 𝑝) ∢ 𝑖 β‰₯ 0} ∈ 𝑃ℱ by Lemma 5.6 (5), Lemma 5.2 (1), and the induction hypothesis. (5) The case of π‘Ž = 𝑝?. ⇀ℛ (𝑝?, π‘ž) = ¬𝑅 𝑝 ⊎ (𝑝 ∩ π‘ž) ∈ 𝑃ℱ by Lemma 5.7 (2) and the definition of ⊎. Theorem 5.9. The characteristic algebra 𝐢(β„±β„› ) of an orthostable self-adjoint QD-frame β„±β„› = (𝑆, 𝑅, β„›) is a QD-algebra. Proof. (𝑃ℱ , βŠ†) is a complete ortholattice with the infimum β‹‚ Ξ“ and supremum ⨄ Ξ“ for each Ξ“ βŠ† 𝑃ℱ by Theorem 5.4. Moreover, (𝑃ℱ , βŠ†) is an orthomodular lattice. To show the orthomodular law, it suffices to show that 𝑠 ∈ 𝑝 ∩ ⇀ℛ (𝑝?, π‘ž) implies 𝑠 ∈ π‘ž. Because 𝑠 ∈ 𝑝, it follows from Lemma 5.7 (1) that 𝑠𝑅𝑝? 𝑠. Therefore, 𝑠 ∈ ⇀ℛ (𝑝?, π‘ž) implies 𝑠 ∈ π‘ž. Finally, we prove that 𝐢(β„±β„› ) is a QD-algebra. The only remaining thing to be shown is the conditions (1)–(8) of Definition 3.2 but all of them except for (3) ⇀ℛ (π‘Ž, 𝑆) = 𝑆 and (4) ⇀ℛ (π‘Ž, 𝑝 ∩ π‘ž) = ⇀ℛ (π‘Ž, 𝑝) ∩ ⇀ℛ (π‘Ž, π‘ž) have already been shown in Lemma 5.6. (3) Proof of ⇀ℛ (π‘Ž, 𝑆) = 𝑆. Immediate. 13 (4) Proof of ⇀ℛ (π‘Ž, 𝑝 ∩ π‘ž) = ⇀ℛ (π‘Ž, 𝑝) ∩ ⇀ℛ (π‘Ž, π‘ž). ⇀ℛ (π‘Ž, 𝑝 ∩ π‘ž) = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑑 β‡’ 𝑑 ∈ 𝑝 ∩ π‘ž)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑑 β‡’ 𝑑 ∈ 𝑝 and 𝑑 ∈ π‘ž)} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 ((π‘ π‘…π‘Ž 𝑑 β‡’ 𝑑 ∈ 𝑝) and (π‘ π‘…π‘Ž 𝑑 β‡’ 𝑑 ∈ π‘ž))} = {𝑠 ∈ 𝑆 ∢ βˆ€π‘‘ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑑 β‡’ 𝑑 ∈ 𝑝) and βˆ€π‘‘ ∈ 𝑆 (π‘ π‘…π‘Ž 𝑑 β‡’ 𝑑 ∈ π‘ž)} = ⇀ℛ (π‘Ž, 𝑝) ∩ ⇀ℛ (π‘Ž, π‘ž). 6. Conclusion In this paper, we formulated an algebra of regular quantum programs with the Kleene star operator called QD-algebra by combining complete orthomodular lattice and dynamic algebra. Moreover, to relate a QD-algebra to a state transition system induced by transitions of programs, we defined a specific QD-algebra associated with relations called characteristic algebra. Our main result is that a characteristic algebra of an orthostable self-adjoint QD-frame is a QD- algebra (Theorem 5.9). The contribution of this paper is to give the semantics of the full-fledged DQL. The semantics proposed so far are those of DQL lacking the Kleene star operator. However, the Kleene star operator is indispensable to express practical quantum programs, especially quantum while programs. Therefore, the semantics proposed in this paper is useful for the formal verification of meaningful quantum programs. Acknowledgments The author would like to thank Prof. Kazuhiro Ogata for helpful feedback on this manuscript. This work was supported by Grant-in-Aid for JSPS Research Fellow Grant Number 22J23575. References [1] A. Baltag, S. Smets, Quantum logic as a dynamic logic, Synthese 179 (2011) 285–306. [2] A. Baltag, S. Smets, LQP: the dynamic logic of quantum information, Mathematical structures in computer science 16 (2006) 491–525. [3] A. Baltag, J. Bergfeld, K. Kishida, J. Sack, S. Smets, S. Zhong, PLQP & company: decidable logics for quantum algorithms, International Journal of Theoretical Physics 53 (2014) 3628–3647. [4] J. M. Bergfeld, J. Sack, Deriving the correctness of quantum protocols in the probabilistic logic for quantum programs, Soft Computing 21 (2017) 1421–1441. [5] A. Baltag, S. Smets, Reasoning about quantum information: An overview of quantum dynamic logic, Applied Sciences 12 (2022) 4458. [6] G. Birkhoff, J. von Neumann, The logic of quantum mechanics, Annals of mathematics 57 (1936) 823–843. 14 [7] D. Harel, D. Kozen, J. Tiuryn, Dynamic Logic, MIT Press, 2000. [8] A. Ambainis, E. Bach, A. Nayak, A. Vishwanath, J. Watrous, One-dimensional quantum walks, in: Proceedings of the thirty-third annual ACM symposium on Theory of computing, 2001, pp. 37–49. [9] M. Hirvensalo, Quantum automata theory–a review, Algebraic Foundations in Computer Science (2011) 146–167. [10] V. Pratt, Dynamic algebras: Examples, constructions, applications, Studia Logica 50 (1991) 571–605. [11] M. RΓ©dei, Quantum logic in algebraic approach, volume 91 of Fundamental Theories of Physics, Springer, 1998. [12] M. L. D. Chiara, R. Giuntini, Quantum logics, in: Handbook of Philosophical Logic, volume 6, 2nd ed., Kluwer Academic Publishers, 2002, pp. 129–228. [13] I. Amemiya, H. Araki, A remark on piron’s paper, Publications of the Research Institute for Mathematical Sciences 2 (1966) 423–427. [14] D. J. Foulis, A note on orthomodular lattices, Portugaliae mathematica 21 (1962) 65–72. [15] S. S. Holland, A radon-nikodym theorem in dimension lattices, Transactions of the American Mathematical Society 108 (1963) 66–87. [16] L. Herman, E. L. Marsden, R. Piziak, Implication connectives in orthomodular lattices, Notre Dame Journal of Formal Logic 16 (1975) 305–328. [17] G. M. Hardegree, The conditional in quantum logic, Synthese 29 (1974) 63–80. [18] D. J. Foulis, C. H. Randall, Lexicographic orthogonality, Journal of Combinatorial Theory, Series A 11 (1971) 157–162. [19] R. I. Goldblatt, Semantic analysis of orthologic, Journal of Philosophical Logic 3 (1974) 19–35. [20] T. Kawano, Advanced Kripke frame for quantum logic, in: International Workshop on Logic, Language, Information, and Computation, 2018, pp. 237–249. [21] A. Baltag, S. Smets, Complete axiomatizations for quantum actions, International Journal of Theoretical Physics 44 (2005) 2267–2282. [22] B. A. Davey, H. A. Priestley, Introduction to lattices and order, 2nd ed., Cambridge university press, 2002. 15