diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-01-14 13:13:00 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-01-14 13:13:00 +0100 |
commit | 9c2be74a5369c1bdb737a67c7c508cb50c62bd83 (patch) | |
tree | 4b2972936dc6377e2df28b6da3b3485a50296813 /Bidir.agda | |
parent | a01871259837d6e36c580338f6d29ea0b154ed04 (diff) | |
download | bidiragda-9c2be74a5369c1bdb737a67c7c508cb50c62bd83.tar.gz |
define a more useful version of lemma-just\==nnothing
If one had a parameter of type just x \== nothing it could be simply
refuted by case splitting. So the cases where lemma-just\==nnothing was
used always employed trans to combine two results. The new version takes
both results instead.
Diffstat (limited to 'Bidir.agda')
-rw-r--r-- | Bidir.agda | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -53,7 +53,7 @@ lemma-lookupM-assoc i is x xs h p | just h' = apply-checkInsertProof i x h' r lookupM i (insert i x h') ≡⟨ lemma-lookupM-insert i x h' ⟩ just x ∎ - ; wrong = λ x' x≢x' lookupM≡justx' → lemma-just≢nothing (trans (sym p) (lemma-checkInsert-wrong i x h' x' x≢x' lookupM≡justx')) + ; wrong = λ x' x≢x' lookupM≡justx' → lemma-just≢nothing p (lemma-checkInsert-wrong i x h' x' x≢x' lookupM≡justx') } lemma-∉-lookupM-assoc : {m n : ℕ} → (i : Fin n) → (is : Vec (Fin n) m) → (xs : Vec Carrier m) → (h : FinMapMaybe n Carrier) → assoc is xs ≡ just h → (i ∉ toList is) → lookupM i h ≡ nothing @@ -83,7 +83,7 @@ lemma-assoc-domain (i' ∷ is') (x' ∷ xs') h ph | just h' | [ ph' ] = apply-ch (Data.List.All.map (λ {i} p → proj₁ p , lemma-lookupM-checkInsert i i' (proj₁ p) x' h' h (proj₂ p) ph) (lemma-assoc-domain is' xs' h' ph')) - ; wrong = λ x'' x'≢x'' lookupM-i'-h'≡just-x'' → lemma-just≢nothing (trans (sym ph) (lemma-checkInsert-wrong i' x' h' x'' x'≢x'' lookupM-i'-h'≡just-x'')) + ; wrong = λ x'' x'≢x'' lookupM-i'-h'≡just-x'' → lemma-just≢nothing ph (lemma-checkInsert-wrong i' x' h' x'' x'≢x'' lookupM-i'-h'≡just-x'') } lemma-map-lookupM-insert : {m n : ℕ} → (i : Fin n) → (is : Vec (Fin n) m) → (x : Carrier) → (h : FinMapMaybe n Carrier) → i ∉ (toList is) → map (flip lookupM (insert i x h)) is ≡ map (flip lookupM h) is |