@@ -26,7 +26,7 @@ open import Data.Vec.Properties using (lookup-map)
26
26
open import Data.Vec.Relation.Binary.Pointwise.Extensional as PW
27
27
using (Pointwise; ext)
28
28
open import Function.Base using (_∘_; _$_; flip)
29
- open import Relation.Binary.PropositionalEquality as P using (_≗_)
29
+ open import Relation.Binary.PropositionalEquality as ≡ using (_≗_)
30
30
import Relation.Binary.Reflection as Reflection
31
31
32
32
-- Expressions made up of variables and the operations of a boolean
@@ -68,7 +68,7 @@ module Naturality
68
68
(f : Applicative.Morphism A₁ A₂)
69
69
where
70
70
71
- open P .≡-Reasoning
71
+ open ≡ .≡-Reasoning
72
72
open Applicative.Morphism f
73
73
open Semantics A₁ renaming (⟦_⟧ to ⟦_⟧₁)
74
74
open Semantics A₂ renaming (⟦_⟧ to ⟦_⟧₂)
@@ -77,21 +77,21 @@ module Naturality
77
77
78
78
natural : ∀ {n} (e : Expr n) → op ∘ ⟦ e ⟧₁ ≗ ⟦ e ⟧₂ ∘ Vec.map op
79
79
natural (var x) ρ = begin
80
- op (Vec.lookup ρ x) ≡⟨ P .sym $ lookup-map x op ρ ⟩
80
+ op (Vec.lookup ρ x) ≡⟨ ≡ .sym $ lookup-map x op ρ ⟩
81
81
Vec.lookup (Vec.map op ρ) x ∎
82
82
natural (e₁ or e₂) ρ = begin
83
83
op (_∨_ <$>₁ ⟦ e₁ ⟧₁ ρ ⊛₁ ⟦ e₂ ⟧₁ ρ) ≡⟨ op-⊛ _ _ ⟩
84
- op (_∨_ <$>₁ ⟦ e₁ ⟧₁ ρ) ⊛₂ op (⟦ e₂ ⟧₁ ρ) ≡⟨ P .cong₂ _⊛₂_ (op-<$> _ _) P .refl ⟩
85
- _∨_ <$>₂ op (⟦ e₁ ⟧₁ ρ) ⊛₂ op (⟦ e₂ ⟧₁ ρ) ≡⟨ P .cong₂ (λ e₁ e₂ → _∨_ <$>₂ e₁ ⊛₂ e₂) (natural e₁ ρ) (natural e₂ ρ) ⟩
84
+ op (_∨_ <$>₁ ⟦ e₁ ⟧₁ ρ) ⊛₂ op (⟦ e₂ ⟧₁ ρ) ≡⟨ ≡ .cong₂ _⊛₂_ (op-<$> _ _) ≡ .refl ⟩
85
+ _∨_ <$>₂ op (⟦ e₁ ⟧₁ ρ) ⊛₂ op (⟦ e₂ ⟧₁ ρ) ≡⟨ ≡ .cong₂ (λ e₁ e₂ → _∨_ <$>₂ e₁ ⊛₂ e₂) (natural e₁ ρ) (natural e₂ ρ) ⟩
86
86
_∨_ <$>₂ ⟦ e₁ ⟧₂ (Vec.map op ρ) ⊛₂ ⟦ e₂ ⟧₂ (Vec.map op ρ) ∎
87
87
natural (e₁ and e₂) ρ = begin
88
88
op (_∧_ <$>₁ ⟦ e₁ ⟧₁ ρ ⊛₁ ⟦ e₂ ⟧₁ ρ) ≡⟨ op-⊛ _ _ ⟩
89
- op (_∧_ <$>₁ ⟦ e₁ ⟧₁ ρ) ⊛₂ op (⟦ e₂ ⟧₁ ρ) ≡⟨ P .cong₂ _⊛₂_ (op-<$> _ _) P .refl ⟩
90
- _∧_ <$>₂ op (⟦ e₁ ⟧₁ ρ) ⊛₂ op (⟦ e₂ ⟧₁ ρ) ≡⟨ P .cong₂ (λ e₁ e₂ → _∧_ <$>₂ e₁ ⊛₂ e₂) (natural e₁ ρ) (natural e₂ ρ) ⟩
89
+ op (_∧_ <$>₁ ⟦ e₁ ⟧₁ ρ) ⊛₂ op (⟦ e₂ ⟧₁ ρ) ≡⟨ ≡ .cong₂ _⊛₂_ (op-<$> _ _) ≡ .refl ⟩
90
+ _∧_ <$>₂ op (⟦ e₁ ⟧₁ ρ) ⊛₂ op (⟦ e₂ ⟧₁ ρ) ≡⟨ ≡ .cong₂ (λ e₁ e₂ → _∧_ <$>₂ e₁ ⊛₂ e₂) (natural e₁ ρ) (natural e₂ ρ) ⟩
91
91
_∧_ <$>₂ ⟦ e₁ ⟧₂ (Vec.map op ρ) ⊛₂ ⟦ e₂ ⟧₂ (Vec.map op ρ) ∎
92
92
natural (not e) ρ = begin
93
93
op (¬_ <$>₁ ⟦ e ⟧₁ ρ) ≡⟨ op-<$> _ _ ⟩
94
- ¬_ <$>₂ op (⟦ e ⟧₁ ρ) ≡⟨ P .cong (¬_ <$>₂_) (natural e ρ) ⟩
94
+ ¬_ <$>₂ op (⟦ e ⟧₁ ρ) ≡⟨ ≡ .cong (¬_ <$>₂_) (natural e ρ) ⟩
95
95
¬_ <$>₂ ⟦ e ⟧₂ (Vec.map op ρ) ∎
96
96
natural top ρ = begin
97
97
op (pure₁ ⊤) ≡⟨ op-pure _ ⟩
0 commit comments