Prove that join is monotonic in both arguments

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
Danila Fedorin 2024-03-03 16:51:57 -08:00
parent 2ddac38c3f
commit a8d26b1c48

View File

@ -62,6 +62,26 @@ record IsSemilattice {a} (A : Set a)
(a a₁) (a a₂)
⊔-Monotonicʳ : (a₂ : A) Monotonic _≼_ _≼_ (λ a₁ a₁ a₂)
⊔-Monotonicʳ a {a₁} {a₂} a₁≼a₂ = ≈-trans (≈-sym lhs) (≈-⊔-cong a₁≼a₂ (≈-refl {a}))
where
lhs =
begin
(a₁ a₂) a
∼⟨ ≈-⊔-cong ≈-refl (≈-sym (⊔-idemp _))
(a₁ a₂) (a a)
∼⟨ ≈-sym (⊔-assoc _ _ _)
((a₁ a₂) a) a
∼⟨ ≈-⊔-cong (⊔-assoc _ _ _) ≈-refl
(a₁ (a₂ a)) a
∼⟨ ≈-⊔-cong (≈-⊔-cong ≈-refl (⊔-comm _ _)) ≈-refl
(a₁ (a a₂)) a
∼⟨ ≈-⊔-cong (≈-sym (⊔-assoc _ _ _)) ≈-refl
((a₁ a) a₂) a
∼⟨ ⊔-assoc _ _ _
(a₁ a) (a₂ a)
≼-refl : (a : A) a a
≼-refl a = ⊔-idemp a