Download SKETCHES AND SPECIFICATIONS USER'S GUIDE Second part
Transcript
4 MOSAICS AND RIBBON PRODUCT 32 • a weft of ρ-stratifications (S, T, R : T → S ◦ ρ), • and a counter-model κ : F −→ Weft(A). Weft(A) = W eee κ ee\eee re ρ F ( T /E +3 R * Set t ) S Then S is called the apparent weft of the A-mosaic Σ, and Σ is also called an A-mosaic of S. Definition 9 Let Σ = (ρ : F → E, R : T → S ◦ ρ, κ : F −→ Weft(A)) be an A-mosaic, and let A be a point of A. A realization of Σ towards A is a realization of T towards RealA (κ(−), A): RealA (Σ, A) = RealMod (F)(T, RealA (κ(−), A)) . If Σ is an A-mosaic, A a point of A and ω a realization of Σ towards A, then we say that Σ specifies ω (with respect to A and A). As in [guide1, section 2.5], this is only half of what is needed for mosaics to be a good specification tool. The second half, related to programs, will be seen in [guide3]: indeed A-mosaics will allow us to deal with imperative programming. Now let us check that mosaics do generalize wefts. Let S be an A-weft, and assume that A is projectively sketchable, i.e. A Mod (E) for some projective sketch E. Since A is a subcategory A determines a of Weft(A), the Yoneda counter-model of E [guide1, section 4.4] YE : E −→ counter-model, also denoted YE , from E towards Weft(A). The Yoneda lemma for projective sketches states that for all point A of A, the set RealA (YE (−), A) = HomA (YE (−), A) can be identified with A. Let Σ denote the mosaic made of: - id E : E → E , - id S : S → S ◦ id E , Weft (Mod(E)) . - YE : E −→ It follows from the Yoneda lemma that the set of realizations of Σ can be identified with the set of realizations of S. From now on, we assume that: A is a cocomplete category, so that the category Weft(A) is also cocomplete. Definition 10 Let Σ = (ρ, R, κ) be an A-mosaic, The explicit weft of Σ is the A-weft: Expl (Σ) = κ ρ R . Corollary 2 states that, for all mosaic Σ, the explicit weft Expl (Σ) has the same realizations as Σ. It can be reformulated as: Corollary 3 (Fundamental property of mosaics) Let A be a cocomplete category and A a point of A. Let Σ be an A-mosaic and Expl (Σ) its explicit weft. Then there is a canonical bijection: RealA (Σ, A) ∼ = RealA (Expl (Σ), A) .