<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Symmetric c-Lenses and Symmetric d-Lenses are Not Coextensive</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Michael</forename><surname>Johnson</surname></persName>
						</author>
						<author>
							<persName><forename type="first">François</forename><surname>Renaud</surname></persName>
						</author>
						<author>
							<affiliation key="aff0">
								<orgName type="institution">Macquarie University Sydney</orgName>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff1">
								<orgName type="institution">Université Catholique de Louvain</orgName>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff2">
								<address>
									<settlement>Philadelphia</settlement>
									<region>PA</region>
									<country key="US">USA</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Symmetric c-Lenses and Symmetric d-Lenses are Not Coextensive</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">9405C3FFEFDC9F532EC37817B3B4E19C</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-23T23:50+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>This short paper addresses a long standing open question about symmetric lenses, with the result succinctly summarised by the paper's title.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>It has been clear for some years that symmetric lenses of various kinds can be constructed in a systematic way as equivalence classes of spans of asymmetric lenses of corresponding kinds <ref type="bibr" target="#b3">[4]</ref>. For example, given a definition of asymmetric delta lens <ref type="bibr" target="#b0">[1]</ref>, referred to here and elsewhere as a d-lens <ref type="bibr" target="#b2">[3]</ref>, one can systematically construct a notion of symmetric d-lens <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b4">5]</ref>, and a category whose morphisms are those symmetric d-lenses. Among the d-lenses there are some particularly useful lenses, called c-lenses <ref type="bibr" target="#b6">[7]</ref> (and previously known to the mathematical community as split opfibrations) which have an attractive universal property that in many applications corresponds to least change updating. Naturally there has been interest in symmetric c-lenses, which can again be systematically constructed, and which might be expected to have an attractive universal property which could perhaps in applications capture a new notion of least change symmetric lens updating <ref type="bibr" target="#b5">[6]</ref>. However, the effects of the universal properties of the component c-lenses of a span of c-lenses occur mainly in the peak of the span, and that corresponds in applications to hidden data. Indeed, it can be shown that every span of c-lenses, viewed as a symmetric lens, is equivalent to a span of d-lenses in which the component d-lenses are not themselves c-lenses. In other words, the behaviour of a symmetric c-lens can always be obtained from a span of lenses which themselves do not have the c-lens universal property. And that raises the until now open question of whether there are in fact any differences at all between symmetric c-lenses and symmetric d-lenses.</p><p>In this paper we show that a span of c-lenses does have a weak symmetric lens universal property, and that there are spans of d-lenses that do not exhibit this property, establishing that there are symmetric d-lenses which never arise as symmetric c-lenses.</p><p>In mathematical terms: We look at spans of functors (G, D) with common domain R, and the induced relation (R, G, D) between the codomain categories. We discuss properties of these relations that are satisfied when the legs of the span are opfibrations. More precisely when the left leg G admits a splitting, the relation admits an induced so called a left-right behaviour δ. Roughly it associates a related morphism on the right to a given morphism on the left. If the splitting is opfibrant then given a factorization on the left, whose composite is related to a morphism on the right, there is a related factorization on the right built from the left-right behaviour δ and the universal property of the left leg G. We build a counter-example showing that such a factorization on the right cannot always be obtained from a factorization on the left when G is not opfibrant.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Definitions</head><p>Let R and G be categories and R G / / G be a functor between them.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Splittings and Opfibrations</head><p>Definition 2.1. Assuming that all our categories are conveniently small, a splitting P for the functor G is a family (P x ) x∈Ob(R) of functions, indexed by the objects x of R, between unions of homsets with fixed domain:</p><formula xml:id="formula_0">G(G(x), −) Px / / R(x, −)</formula><p>The notation R(x, −) denotes the union y∈Ob(R) R(x, y), and similarly G(G(x), −) = z∈Ob(G) G(G(x), z). The image P x (f ) of a morphism f with domain G(x) is called the lifting of f at x (by P ) and is required to satisfy</p><formula xml:id="formula_1">G(P x (f )) = f .</formula><p>Moreover a splitting is required to satisfy:</p><p>1. identities of G are lifted to identities of R;</p><p>2. if f and g are composable morphisms in G with liftings P x (f ) with codomain y say, and P y (g), then the composite of the liftings, P y (g)P x (f ), is equal to the lifting of the composite, P x (gf ).</p><p>Definition 2.2. A morphism x f / / y in R is said to be opcartesian (with respect to G) if for any other morphism x g / / z such that there exists a morphism G(y)</p><formula xml:id="formula_2">t / / G(z) in G with G(g) = tG(f ), there is a unique morphism y t / / z in R such that g = t f and G(t ) = t: if G(z) G(x) G(f ) / / G(g)<label>6 6</label></formula><p>G(y)</p><formula xml:id="formula_3">t O O then z x f / / g 6<label>6</label></formula><formula xml:id="formula_4">y t O O Definition 2.3.</formula><p>• The functor G is said to be an opfibration if for every object x in R, each morphism</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>G(x)</head><p>f / / y in G admits an opcartesian lifting x f / / y (i.e. an opcartesian arrow f such that G(f ) = f ).</p><p>• Moreover a splitting P for an opfibration G is a splitting in the sense of Definition 2.1 such that all liftings by P are opcartesian.</p><p>The above definitions give precise mathematical representations of d-lenses and c-lenses: d-lenses R G / / G are splittings, and c-lenses R G / / G are split opfibrations. • Two objects x in G and y in D are defined to be related xRy if and only if there is w in R such that G(w) = x and D(w) = y. We then call w the witness and we sometimes include w in the notation by writing xR w y.</p><p>• The relation on morphisms is defined similarly.</p><p>Now symmetric lenses are equivalence classes of spans of asymmetric lenses, and it is important to note that the induced left right behaviour is an invariant of the equivalence. Indeed, the reason the equivalence was introduced for symmetric lenses was because differences that aren't visible in left-right or right-left behaviours are irrelevant for symmetric lenses.</p><p>Thus, if a span of lenses induces a left-right behaviour δ which is weakly opcartesian with respect to its rightleft behaviour γ, then any equivalent span of lenses also exhibits a left-right behaviour that is weakly opcartesian with respect to its right-left behaviour. In other words, the left-right behaviour being weakly opcartesian with respect to the right-left behaviour is an invariant among representatives of the equivalence class.</p><p>3 Observations Lemma 3.1. Given (R, G, D), if G is an opfibration and P is a splitting for it in the sense of Definition 2.3, while D is a functor and S is a splitting for it (so in the sense of Definition 2.1), then the induced left-right behaviour δ P , is weakly opcartesian with respect to the induced right-left behaviour γ S .</p><p>Proof. Given a synchronization G(x)R x D(x) and a morphism k : D(x) → z in D, if γ S (k) factorizes as ts in G, then by the universal property of the opcartesian lifting P x (s) of s, there is an induced t , as in the diagram below, such that G(t ) = t. Taking the image by D then concludes the proof: We observe that the relation (R, G, D) is not left-right-compatible with factorizations since G(l) admits a factorization through G(s) but D(l) does not factorize through D(s). Also G and D may be equipped with splittings, but G cannot be an opfibration since s, the only possible lifting of G(s), is not opcartesian. Under Definition 2.1 there can in this case be only one choice of a splitting for each functor. The splitting of G, P say, gives us an induced left-right behaviour δ P , and the splitting of D, S say, gives us an induced right-left behaviour γ S .</p><formula xml:id="formula_5">G(y) G(x) s / / γ S (k,x)</formula><p>The left-right behaviour δ P is not weakly opcartesian with respect to γ S .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Conclusion</head><p>We have just provided a relatively simple counterexample to resolve a longstanding open question. The question was whether the symmetric lenses obtained as equivalence classes of spans of c-lenses, and those obtained as equivalence classes of spans of d-lenses were in fact different. If the counterexample is so simple, why has it taken so long? It is the theoretical work of this paper that makes the above span of d-lenses into a counterexample. The difficulty is a common problem: Proving that there is no span of c-lenses that is equivalent to the span of d-lenses shown above is, a priori, very difficult. What we have done in this short paper is identify a property of a span of c-lenses that is also present in all equivalent spans of d-lenses. Since that property is not exhibited by the span of d-lenses above, that span cannot be equivalent to any span of c-lenses, thus resolving the question and showing that c-lenses and d-lenses are not coextensive.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>2. 2 Definition 2 . 4 .</head><label>224</label><figDesc>Spans, Relations, and Left-Right Behaviours Given again categories R and G and R G / / G a functor between them, let D be another category and R D / / D another functor so that we have the span (R, G, D): We define the relation (R, G, D) between G and D associated to the span (G, D) as follows.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Counter-example 3 . 2 .</head><label>32</label><figDesc>Consider the categories R, G, D, and the functors G, D illustrated in the diagram below.</figDesc></figure>
		</body>
		<back>
			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Of course we have that if f R q g then the domains and codomains of f and g are related by (R, G, D) with witnesses the domain and codomain of q. Also xRy if and only if id x R id y . Definition 2.5. Left-right behaviour of (R, G, D):</p><p>• Given an object x in R we have G(x)R x D(x), and then G(x) and D(x) are called synchronized states.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Then consider a morphism G(x)</head><p>f / / y , which we may call a change of state in G, from G(x) to y.</p><p>• We say that (R, G, D) has a left-right behaviour δ if for each such choice of x and f , there is a corresponding synchronisation in D, i.e. there is a given morphism (change of state) δ(f, x) of D with domain D(x) and such that f Rδ(f, x).</p><p>• One can define a right-left behaviour of a span similarly.</p><p>• Suppose that G admits a splitting P . Then there exists an induced left-right behaviour, denoted δ P , defined, for x and f as before, by the lifting of f , x</p><p>/ / y in R, which yields a common change of state in R.</p><p>It then suffices to take the image by D in order to obtain the synchronisation D(x) δ P (f,x) . .=D(P x(f )) / / D(y) .</p><p>When G and D are both d-lenses, the induced left-right behaviour corresponds to the forward propagation of the corresponding symmetric d-lens, and similarly, the induced right-left behaviour corresponds to the backward propagation.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Weakly Opcartesian Behaviours</head><p>We identify now a property of behaviours of (R, G, D) which is not necessarily satisfied in general but which is always satisfied when G is an opfibration. Definition 2.6. Suppose that (R, G, D) has both a given left-right behaviour δ and a given right-left behaviour γ. We define what it means for δ to be weakly opcartesian with respect to γ.</p><p>• Let G(x)R x D(x) be synchronized states and let G(x)</p><p>f / / y be a change of state which is carried by the forward behaviour to D(x)</p><p>/ / D(y ) .</p><p>• Consider a change of state D(x) k / / z in D, which is carried by the backward behaviour to γ(k, x): • Now suppose that there exists a morphism y l / / G(z ) such that γ(k, x) = lf , we then say that δ is weakly opcartesian with respect to γ if and only if for each such x, f , k and l, there is an induced l in D such that lRl and k = l δ(f, x): </p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">From State-to Delta-Based Model Transformations: the Asymmetric Case</title>
		<author>
			<persName><forename type="first">Z</forename><surname>Diskin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Xiong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Czarnecki</surname></persName>
		</author>
		<idno type="DOI">10.5381/jot.2011.10.1.a6</idno>
	</analytic>
	<monogr>
		<title level="j">Journal of Object Technology</title>
		<imprint>
			<biblScope unit="volume">10</biblScope>
			<biblScope unit="page" from="1" to="25" />
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">From State-to Delta-Based Bidirectional Model Transformations: the Symmetric Case</title>
		<author>
			<persName><forename type="first">Zinovy</forename><surname>Diskin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Yingfei</forename><surname>Xiong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Krzysztof</forename><surname>Czarnecki</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Hartmut</forename><surname>Ehrig</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Frank</forename><surname>Hermann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Francesco</forename><surname>Orejas</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-3-642-24485-8-22</idno>
	</analytic>
	<monogr>
		<title level="j">Lecture Notes in Computer Science</title>
		<imprint>
			<biblScope unit="volume">6981</biblScope>
			<biblScope unit="page" from="304" to="318" />
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Delta lenses and opfibrations</title>
		<author>
			<persName><forename type="first">M</forename><surname>Johnson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Rosebrugh</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 2nd International Workshop on Bidirectional Transformations</title>
				<meeting>the 2nd International Workshop on Bidirectional Transformations</meeting>
		<imprint>
			<date type="published" when="2013">2013</date>
			<biblScope unit="volume">57</biblScope>
			<biblScope unit="page">18</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Unifying set-based, delta-based and edit-based lenses</title>
		<author>
			<persName><forename type="first">M</forename><surname>Johnson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Rosebrugh</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 5th International Workshop on Bidirectional Transformations</title>
		<title level="s">Eindhoven CEUR Proceedings</title>
		<meeting>the 5th International Workshop on Bidirectional Transformations</meeting>
		<imprint>
			<date type="published" when="2016">2016</date>
			<biblScope unit="volume">1571</biblScope>
			<biblScope unit="page" from="1" to="13" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Symmetric delta lenses and spans of asymmetric delta lenses</title>
		<author>
			<persName><forename type="first">M</forename><surname>Johnson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Rosebrugh</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of Object Technology</title>
		<imprint>
			<biblScope unit="volume">16</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="1" to="32" />
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Universal updates for symmetric lenses</title>
		<author>
			<persName><forename type="first">M</forename><surname>Johnson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Rosebrugh</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">CEUR Proceedings</title>
		<imprint>
			<biblScope unit="volume">1827</biblScope>
			<biblScope unit="page" from="39" to="53" />
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Lenses, fibrations and universal translations</title>
		<author>
			<persName><forename type="first">M</forename><surname>Johnson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Rosebrugh</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">J</forename><surname>Wood</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Mathematical Structures in Computer Science</title>
		<imprint>
			<biblScope unit="volume">22</biblScope>
			<biblScope unit="page" from="25" to="42" />
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
