diff --git a/CHANGELOG.md b/CHANGELOG.md index eb838bcbe1..c1226b376e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -157,6 +157,10 @@ Non-backwards compatible changes defined in `Data.List.Relation.Binary.Permutation.{Propositional|Setoid}`, has been removed. +* In `Data.Tree.AVL.Indexed.Relation.Unary.Any.Properties.Insert`: + `insertWith-just` is strengthened to prevent the possibility of `insertWith` + ignoring the old value. + * In `Data.Product.Relation.Binary.Pointwise.Dependent`, the universe level of the `record POINTWISE` has been lowered to `ℓ₁ ⊔ ℓ₂` given the universe levels `ℓ₁`, resp. `ℓ₂` of the argument relations `_R₁_`, resp. `_R₂_`. diff --git a/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties/Insert.agda b/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties/Insert.agda index 7903deeca4..7b6b11fd48 100644 --- a/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties/Insert.agda +++ b/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties/Insert.agda @@ -46,6 +46,7 @@ private l u : Key⁺ h : ℕ P : Pred (K& V) p + Q : Pred (K& V) p module _ {V : Value v} (open Value V using (respects) renaming (family to Val)) where @@ -74,55 +75,57 @@ module _ {V : Value v} (open Value V using (respects) renaming (family to Val)) ih = insertWith-nothing ku l _ _ k>k′ = - joinʳ⁺-right⁺ kv lk ku′ bal (insertWith-just ku lk′ ]ᴿ , k _ _ k>k′ = begin-contradiction - [ k ] ≈⟨ [ eq ]ᴱ ⟩ + ... | here _ | tri> _ _ k>k′ = begin-contradiction + [ k ] ≈⟨ [ k≈p ]ᴱ ⟩ [ k′ ] <⟨ [ k>k′ ]ᴿ ⟩ [ k ] ∎ ... | left lp | tri≈ _ k≈k′ _ = begin-contradiction - let k″ = Any.lookup lp .key; k≈k″ = lookup-result lp; (_ , k″ _ _ k>k′ = begin-contradiction - let k″ = Any.lookup lp .key; k≈k″ = lookup-result lp; (_ , k″k′ ]ᴿ ⟩ [ k ] ∎ ... | right rp | tri< k