From 7309d04bb2eb5bfcbf9eb1e7f1f92fc1bdd470f2 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 9 Feb 2012 12:35:10 +0100 Subject: [PATCH] started proving theorem-1 As in the bff paper expand s using lemma-map-denumerate-enumerate and apply free-theorem-list-list to commute get and map. --- Bidir.agda | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Bidir.agda b/Bidir.agda index 0c9f0e5..db78f9e 100644 --- a/Bidir.agda +++ b/Bidir.agda @@ -131,4 +131,11 @@ lemma-map-denumerate-enumerate (a ∷ as) = cong (_∷_ a) (begin as ∎) theorem-1 : (get : {α : Set} → List α → List α) → {τ : Set} → (eq : EqInst τ) → (s : List τ) → bff get eq s (get s) ≡ just s -theorem-1 get eq s = {!!} +theorem-1 get eq s = begin + bff get eq s (get s) + ≡⟨ cong (bff get eq s ∘ get) (sym (lemma-map-denumerate-enumerate s)) ⟩ + bff get eq s (get (map (denumerate s) (enumerate s))) + ≡⟨ cong (bff get eq s) (free-theorem-list-list get (denumerate s) (enumerate s)) ⟩ + bff get eq s (map (denumerate s) (get (enumerate s))) + ≡⟨ {!!} ⟩ + just s ∎ -- 2.20.1