# HG changeset patch # User Shinji KONO # Date 1574128235 -32400 # Node ID a8b55fbca18d2d8a957f4538f16c59a81c160252 # Parent 1b54c0623d01f046b092b7be58b01ee0c235b223 ... diff -r 1b54c0623d01 -r a8b55fbca18d agda/finiteSet.agda --- a/agda/finiteSet.agda Tue Nov 19 00:25:43 2019 +0900 +++ b/agda/finiteSet.agda Tue Nov 19 10:50:35 2019 +0900 @@ -141,19 +141,31 @@ n = a Data.Nat.+ b Q : Set Q = A ∨ B - f-a : ∀{i} → (f : Fin i ) → (a : ℕ ) → toℕ f > a → toℕ f < a Data.Nat.+ b → Fin b - f-a {i} f zero lt lt2 = fromℕ≤ lt2 - f-a {suc i} (suc f) (suc a) (s≤s lt) (s≤s lt2) = f-a f a lt lt2 + f-a : ∀{i b} → (f : Fin i ) → (a : ℕ ) → toℕ f > a → toℕ f < a Data.Nat.+ b → Fin b + f-a {i} {b} f zero lt lt2 = fromℕ≤ lt2 + f-a {suc i} {_} (suc f) (suc a) (s≤s lt) (s≤s lt2) = f-a f a lt lt2 f-a zero (suc x) () _ + a ¬a ¬b c = case2 (FiniteSet.Q←F fb (f-a f a c (toℕ ¬a ¬b c = lemma13 where + lemma16 : {a b : ℕ } (f : Fin (a Data.Nat.+ b)) → (lt : toℕ f > a ) → raise a (f-a f a lt (toℕ