@@ -86,7 +86,7 @@ example1a-fromList-∷ʳ : ∀ (x : A) xs .(eq : L.length (xs L.∷ʳ x) ≡ suc
8686                        cast eq (fromList (xs L.∷ʳ x)) ≡ fromList xs ∷ʳ x
8787example1a-fromList-∷ʳ x xs eq =  begin
8888  cast eq (fromList (xs L.∷ʳ x))                   ≡⟨⟩
89-   cast eq (fromList (xs L.++ L.[ x ]))             ≡˘ ⟨ cast-trans eq₁ eq₂ (fromList (xs L.++ L.[ x ])) ⟩ 
89+   cast eq (fromList (xs L.++ L.[ x ]))             ≡⟨ cast-trans eq₁ eq₂ (fromList (xs L.++ L.[ x ])) ⟨ 
9090  cast eq₂ (cast eq₁ (fromList (xs L.++ L.[ x ]))) ≡⟨ cong (cast eq₂) (fromList-++ xs) ⟩
9191  cast eq₂ (fromList xs ++ [ x ])                  ≡⟨ ≈-sym (unfold-∷ʳ (sym eq₂) x (fromList xs)) ⟩
9292  fromList xs ∷ʳ x                                 ∎
@@ -105,7 +105,7 @@ example1b-fromList-∷ʳ : ∀ (x : A) xs .(eq : L.length (xs L.∷ʳ x) ≡ suc
105105example1b-fromList-∷ʳ x xs eq =  begin
106106  fromList (xs L.∷ʳ x)       ≈⟨⟩
107107  fromList (xs L.++ L.[ x ]) ≈⟨ fromList-++ xs ⟩
108-   fromList xs ++ [ x ]       ≈˘ ⟨ unfold-∷ʳ (+-comm 1  (L.length xs)) x (fromList xs) ⟩ 
108+   fromList xs ++ [ x ]       ≈⟨ unfold-∷ʳ (+-comm 1  (L.length xs)) x (fromList xs) ⟨ 
109109  fromList xs ∷ʳ x           ∎
110110  where  open  CastReasoning 
111111
@@ -120,10 +120,10 @@ example1b-fromList-∷ʳ x xs eq = begin
120120--     ≈-trans     : xs ≈[ m≡n ] ys → ys ≈[ n≡o ] zs → xs ≈[ trans m≡n n≡o ] zs 
121121-- Accordingly, `_≈[_]_` admits the standard set of equational reasoning 
122122-- combinators. Suppose `≈-eqn : xs ≈[ m≡n ] ys`, 
123- --     xs ≈⟨ ≈-eqn   ⟩   -- `_≈⟨_⟩_` takes a `_≈[_]_` step, adjusting 
124- --     ys                -- the index at the same time 
123+ --     xs ≈⟨ ≈-eqn ⟩   -- `_≈⟨_⟩_` takes a `_≈[_]_` step, adjusting 
124+ --     ys              -- the index at the same time 
125125-- 
126- --     ys ≈˘ ⟨ ≈-eqn ⟩    -- `_≈˘⟨_⟩ _` takes a symmetric `_≈[_]_` step 
126+ --     ys ≈⟨ ≈-eqn ⟨    -- `_≈⟨_⟨ _` takes a symmetric `_≈[_]_` step 
127127--     xs 
128128example2a  :  ∀  .(eq :  suc m + n ≡ m + suc n) (xs :  Vec A m) a ys → 
129129            cast eq ((reverse xs ∷ʳ a) ++ ys) ≡ reverse xs ++ (a ∷ ys)
@@ -138,7 +138,7 @@ example2a eq xs a ys = begin
138138--     xs ≂⟨ ≡-eqn  ⟩    -- Takes a `_≡_` step; no change to the index 
139139--     ys 
140140-- 
141- --     ys ≂˘ ⟨ ≡-eqn ⟩     -- Takes a symmetric `_≡_` step 
141+ --     ys ≂⟨ ≡-eqn ⟨     -- Takes a symmetric `_≡_` step 
142142--     xs 
143143-- Equivalently, `≈-reflexive` injects `_≡_` into `_≈[_]_`. That is, 
144144-- `xs ≂⟨ ≡-eqn ⟩ ys` is the same as `xs ≈⟨ ≈-reflexive ≡-eqn ⟩ ys`. 
@@ -149,7 +149,7 @@ example2b eq xs a ys = begin
149149  (a ∷ xs) ʳ++ ys         ≂⟨ unfold-ʳ++ (a ∷ xs) ys ⟩          -- index: suc m + n 
150150  reverse (a ∷ xs) ++ ys  ≂⟨ cong (_++ ys) (reverse-∷ a xs) ⟩  -- index: suc m + n 
151151  (reverse xs ∷ʳ a) ++ ys ≈⟨ ∷ʳ-++ eq a (reverse xs) ⟩         -- index: suc m + n 
152-   reverse xs ++ (a ∷ ys)  ≂˘ ⟨ unfold-ʳ++ xs (a ∷ ys) ⟩          -- index: m + suc n 
152+   reverse xs ++ (a ∷ ys)  ≂⟨ unfold-ʳ++ xs (a ∷ ys) ⟨          -- index: m + suc n 
153153  xs ʳ++ (a ∷ ys)         ∎                                    -- index: m + suc n 
154154  where  open  CastReasoning 
155155
@@ -201,11 +201,11 @@ example3b-fromList-++-++′ {xs = xs} {ys} {zs} eq = begin
201201example4-cong²  :  ∀  .(eq :  (m + 1 ) + n ≡ n + suc m) a (xs :  Vec A m) ys → 
202202          cast eq (reverse ((xs ++ [ a ]) ++ ys)) ≡ ys ʳ++ reverse (xs ∷ʳ a)
203203example4-cong² {m =  m} {n} eq a xs ys =  begin
204-   reverse ((xs ++ [ a ]) ++ ys)   ≈˘ ⟨ ≈-cong reverse (cast-reverse (cong (_+ n) (+-comm 1  m)) ((xs ∷ʳ a) ++ ys))
204+   reverse ((xs ++ [ a ]) ++ ys)   ≈⟨ ≈-cong reverse (cast-reverse (cong (_+ n) (+-comm 1  m)) ((xs ∷ʳ a) ++ ys))
205205                                             (≈-cong (_++ ys) (cast-++ˡ (+-comm 1  m) (xs ∷ʳ a))
206-                                                      (unfold-∷ʳ _ a xs)) ⟩ 
206+                                                      (unfold-∷ʳ _ a xs)) ⟨ 
207207  reverse ((xs ∷ʳ a) ++ ys)       ≈⟨ reverse-++ (+-comm (suc m) n) (xs ∷ʳ a) ys ⟩
208-   reverse ys ++ reverse (xs ∷ʳ a) ≂˘ ⟨ unfold-ʳ++ ys (reverse (xs ∷ʳ a)) ⟩ 
208+   reverse ys ++ reverse (xs ∷ʳ a) ≂⟨ unfold-ʳ++ ys (reverse (xs ∷ʳ a)) ⟨ 
209209  ys ʳ++ reverse (xs ∷ʳ a)        ∎
210210  where  open  CastReasoning 
211211
@@ -237,7 +237,7 @@ example5-fromList-++-++′ {xs = xs} {ys} {zs} eq = begin
237237-- and then switch to the reasoning system of `_≈[_]_`. 
238238example6a-reverse-∷ʳ  :  ∀  x (xs :  Vec A n) →  reverse (xs ∷ʳ x) ≡ x ∷ reverse xs
239239example6a-reverse-∷ʳ {n =  n} x xs =  begin-≡
240-   reverse (xs ∷ʳ x)     ≡˘ ⟨ ≈-reflexive refl ⟩ 
240+   reverse (xs ∷ʳ x)     ≡⟨ ≈-reflexive refl ⟨ 
241241  reverse (xs ∷ʳ x)     ≈⟨ ≈-cong reverse (cast-reverse _ _) (unfold-∷ʳ (+-comm 1  n) x xs) ⟩
242242  reverse (xs ++ [ x ]) ≈⟨ reverse-++ (+-comm n 1 ) xs [ x ] ⟩
243243  x ∷ reverse xs        ∎
@@ -249,6 +249,6 @@ example6b-reverse-∷ʳ-by-induction x (y ∷ xs) = begin
249249  reverse (y ∷ (xs ∷ʳ x)) ≡⟨ reverse-∷ y (xs ∷ʳ x) ⟩
250250  reverse (xs ∷ʳ x) ∷ʳ y  ≡⟨ cong (_∷ʳ y) (example6b-reverse-∷ʳ-by-induction x xs) ⟩
251251  (x ∷ reverse xs) ∷ʳ y   ≡⟨⟩
252-   x ∷ (reverse xs ∷ʳ y)   ≡˘ ⟨ cong (x ∷_) (reverse-∷ y xs) ⟩ 
252+   x ∷ (reverse xs ∷ʳ y)   ≡⟨ cong (x ∷_) (reverse-∷ y xs) ⟨ 
253253  x ∷ reverse (y ∷ xs)    ∎
254254  where  open  ≡-Reasoning 
0 commit comments