Prove that the 'join' transformation is monotonic
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -132,23 +132,24 @@ module WithKeys (ks : List A) where
|
||||
; isLattice = isLattice
|
||||
}
|
||||
|
||||
module _ {l} {L : Set l}
|
||||
module GeneralizedUpdate
|
||||
{l} {L : Set l}
|
||||
{_≈ˡ_ : L → L → Set l} {_⊔ˡ_ : L → L → L} {_⊓ˡ_ : L → L → L}
|
||||
(lL : IsLattice L _≈ˡ_ _⊔ˡ_ _⊓ˡ_) where
|
||||
(lL : IsLattice L _≈ˡ_ _⊔ˡ_ _⊓ˡ_)
|
||||
(f : L → FiniteMap) (f-Monotonic : Monotonic (IsLattice._≼_ lL) _≼_ f)
|
||||
(g : A → L → B) (g-Monotonicʳ : ∀ k → Monotonic (IsLattice._≼_ lL) _≼₂_ (g k))
|
||||
(ks : List A) where
|
||||
|
||||
open IsLattice lL using () renaming (_≼_ to _≼ˡ_)
|
||||
|
||||
module _ (f : L → FiniteMap) (f-Monotonic : Monotonic _≼ˡ_ _≼_ f)
|
||||
(g : A → L → B) (g-Monotonicʳ : ∀ k → Monotonic _≼ˡ_ _≼₂_ (g k))
|
||||
(ks : List A) where
|
||||
updater : L → A → B
|
||||
updater l k = g k l
|
||||
|
||||
updater : L → A → B
|
||||
updater l k = g k l
|
||||
f' : L → FiniteMap
|
||||
f' l = (f l) updating ks via (updater l)
|
||||
|
||||
f' : L → FiniteMap
|
||||
f' l = (f l) updating ks via (updater l)
|
||||
|
||||
f'-Monotonic : Monotonic _≼ˡ_ _≼_ f'
|
||||
f'-Monotonic {l₁} {l₂} l₁≼l₂ = f'-Monotonicᵐ lL (proj₁ ∘ f) f-Monotonic g g-Monotonicʳ ks l₁≼l₂
|
||||
f'-Monotonic : Monotonic _≼ˡ_ _≼_ f'
|
||||
f'-Monotonic {l₁} {l₂} l₁≼l₂ = f'-Monotonicᵐ lL (proj₁ ∘ f) f-Monotonic g g-Monotonicʳ ks l₁≼l₂
|
||||
|
||||
all-equal-keys : ∀ (fm₁ fm₂ : FiniteMap) → (Map.keys (proj₁ fm₁) ≡ Map.keys (proj₁ fm₂))
|
||||
all-equal-keys (fm₁ , km₁≡ks) (fm₂ , km₂≡ks) = trans km₁≡ks (sym km₂≡ks)
|
||||
|
||||
Reference in New Issue
Block a user