summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Data/Type/Properties.agda10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Data/Type/Properties.agda b/src/Data/Type/Properties.agda
index 28667fa..16f6d8e 100644
--- a/src/Data/Type/Properties.agda
+++ b/src/Data/Type/Properties.agda
@@ -252,3 +252,13 @@ free-≈ (all {α} {A} {β} {B} A≈B) = begin
≈-sym unit = unit
≈-sym (bin A≈C B≈D) = bin (≈-sym A≈C) (≈-sym B≈D)
≈-sym (all A≈B) = all (λ γ∉∀β∙B γ∉∀α∙A → ≈-sym (A≈B γ∉∀α∙A γ∉∀β∙B))
+
+≈-trans : Transitive _≈_
+≈-trans (var α) (var .α) = var α
+≈-trans unit unit = unit
+≈-trans (bin A≈B A₁≈B₁) (bin B≈C B₁≈C₁) =
+ bin (≈-trans A≈B B≈C) (≈-trans A₁≈B₁ B₁≈C₁)
+≈-trans (all A≈B) (all B≈C) =
+ all (λ δ∉∀α∙A δ∉∀γ∙C →
+ ≈-trans (A≈B δ∉∀α∙A (P.subst (_ ∉_) (free-≈ (all A≈B)) δ∉∀α∙A))
+ (B≈C (P.subst (_ ∉_) (sym (free-≈ (all B≈C))) δ∉∀γ∙C) δ∉∀γ∙C))