diff options
Diffstat (limited to 'src/Core/Thinning.idr')
-rw-r--r-- | src/Core/Thinning.idr | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Core/Thinning.idr b/src/Core/Thinning.idr index 5c380df..e70cf56 100644 --- a/src/Core/Thinning.idr +++ b/src/Core/Thinning.idr @@ -47,8 +47,8 @@ data View : sx `Thins` sy -> Type where Drop : (thin : sx `Thins` sy) -> (0 n : Name) -> View (drop thin n) Keep : (thin : sx `Thins` sy) -> + {auto 0 prf : IsNotId thin} -> -- For uniqueness (0 n : Name) -> - (0 prf : IsNotId thin) -> -- For uniqueness View (keep thin n) %name View view @@ -58,7 +58,7 @@ view : (thin : sx `Thins` sy) -> View thin view IsId = Id sx view (IsThinner (IsBase n)) = Drop IsId n view (IsThinner (IsDrop thinner n)) = Drop (IsThinner thinner) n -view (IsThinner (IsKeep thinner n)) = Keep (IsThinner thinner) n ItIsThinner +view (IsThinner (IsKeep thinner n)) = Keep (IsThinner thinner) n -- Operations ------------------------------------------------------------------ @@ -141,26 +141,26 @@ compAssoc' (Drop thin3 n) view2 view1 = Calc $ ~~ drop ((thin3 . thin2) . thin1) n ...(cong (\thin => drop thin n) $ compAssoc' (view thin3) view2 view1) ~~ drop (thin3 . thin2) n . thin1 ..<(compLeftDrop (thin3 . thin2) thin1 n) ~~ (drop thin3 n . thin2) . thin1 ..<(cong (. thin1) $ compLeftDrop thin3 thin2 n) -compAssoc' (Keep thin3 n _) (Id _) view1 = cong (. thin1) $ sym $ compRightIdentity (keep thin3 n) -compAssoc' (Keep thin3 n _) (Drop thin2 n) view1 = Calc $ +compAssoc' (Keep thin3 n) (Id _) view1 = cong (. thin1) $ sym $ compRightIdentity (keep thin3 n) +compAssoc' (Keep thin3 n) (Drop thin2 n) view1 = Calc $ |~ keep thin3 n . (drop thin2 n . thin1) ~~ keep thin3 n . drop (thin2 . thin1) n ...(cong (keep thin3 n .) $ compLeftDrop thin2 thin1 n) ~~ drop (thin3 . (thin2 . thin1)) n ...(compRightDrop thin3 (thin2 . thin1) n) ~~ drop ((thin3 . thin2) . thin1) n ...(cong (\thin => drop thin n) $ compAssoc' (view thin3) (view thin2) view1) ~~ drop (thin3 . thin2) n . thin1 ..<(compLeftDrop (thin3 . thin2) thin1 n) ~~ (keep thin3 n . drop thin2 n) . thin1 ..<(cong (. thin1) $ compRightDrop thin3 thin2 n) -compAssoc' (Keep thin3 n _) (Keep thin2 n _) (Id _) = Calc $ +compAssoc' (Keep thin3 n) (Keep thin2 n) (Id _) = Calc $ |~ keep thin3 n . (keep thin2 n . id _) ~~ keep thin3 n . keep thin2 n ...(cong (keep thin3 n .) $ compRightIdentity (keep thin2 n)) ~~ (keep thin3 n . keep thin2 n) . id _ ..<(compRightIdentity (keep thin3 n . keep thin2 n)) -compAssoc' (Keep thin3 n _) (Keep thin2 n _) (Drop thin1 n) = Calc $ +compAssoc' (Keep thin3 n) (Keep thin2 n) (Drop thin1 n) = Calc $ |~ keep thin3 n . (keep thin2 n . drop thin1 n) ~~ keep thin3 n . drop (thin2 . thin1) n ...(cong (keep thin3 n .) $ compRightDrop thin2 thin1 n) ~~ drop (thin3 . (thin2 . thin1)) n ...(compRightDrop thin3 (thin2 . thin1) n) ~~ drop ((thin3 . thin2) . thin1) n ...(cong (\thin => drop thin n) $ compAssoc' (view thin3) (view thin2) (view thin1)) ~~ keep (thin3 . thin2) n . drop thin1 n ..<(compRightDrop (thin3 . thin2) thin1 n) ~~ (keep thin3 n . keep thin2 n) . drop thin1 n ..<(cong (. drop thin1 n) $ compKeep thin3 thin2 n) -compAssoc' (Keep thin3 n _) (Keep thin2 n _) (Keep thin1 n _) = Calc $ +compAssoc' (Keep thin3 n) (Keep thin2 n) (Keep thin1 n) = Calc $ |~ keep thin3 n . (keep thin2 n . keep thin1 n) ~~ keep thin3 n . keep (thin2 . thin1) n ...(cong (keep thin3 n .) $ compKeep thin2 thin1 n) ~~ keep (thin3 . (thin2 . thin1)) n ...(compKeep thin3 (thin2 . thin1) n) |