@@ -62,7 +62,7 @@ data SplitRec : List a -> Type where
62 (rrec : Lazy (SplitRec rights)) -> SplitRec (lefts ++ rights)
62 (rrec : Lazy (SplitRec rights)) -> SplitRec (lefts ++ rights)
65−splitRecFix : (xs : List a) -> ((ys : List a) -> smaller ys xs -> SplitRec ys) ->
65+splitRecFix : (xs : List a) -> ((ys : List a) -> Smaller ys xs -> SplitRec ys) ->
66 SplitRec xs
66 SplitRec xs
67splitRecFix xs srec with (split xs)
67splitRecFix xs srec with (split xs)
68 splitRecFix [] srec | SplitNil = SplitRecNil
68 splitRecFix [] srec | SplitNil = SplitRecNil
@@ -76,7 +76,7 @@ splitRecFix xs srec with (split xs)
76||| Constructs the view in O(n lg n)
76||| Constructs the view in O(n lg n)
77export total
77export total
78splitRec : (xs : List a) -> SplitRec xs
78splitRec : (xs : List a) -> SplitRec xs
79−splitRec xs = accInd splitRecFix xs (smallerAcc xs)
79+splitRec = sizeInd splitRecFix
81||| View for traversing a list backwards
81||| View for traversing a list backwards
82public export
82public export
@@ -105,17 +105,17 @@ data Filtered : (a -> a -> Bool) -> List a -> Type where
105 (rrec : Lazy (Filtered p (filter (\y => not (p y x)) xs))) ->
105 (rrec : Lazy (Filtered p (filter (\y => not (p y x)) xs))) ->
106 Filtered p (x :: xs)
106 Filtered p (x :: xs)
108−filteredLOK : (p : a -> a -> Bool) -> (x : a) -> (xs : List a) -> smaller (filter (\y => p y x) xs) (x :: xs)
108+filteredLOK : (p : a -> a -> Bool) -> (x : a) -> (xs : List a) -> Smaller (filter (\y => p y x) xs) (x :: xs)
109filteredLOK p x xs = LTESucc (filterSmaller xs)
109filteredLOK p x xs = LTESucc (filterSmaller xs)
111−filteredROK : (p : a -> a -> Bool) -> (x : a) -> (xs : List a) -> smaller (filter (\y => not (p y x)) xs) (x :: xs)
111+filteredROK : (p : a -> a -> Bool) -> (x : a) -> (xs : List a) -> Smaller (filter (\y => not (p y x)) xs) (x :: xs)
112filteredROK p x xs = LTESucc (filterSmaller xs)
112filteredROK p x xs = LTESucc (filterSmaller xs)
114||| Covering function for the `Filtered` view
114||| Covering function for the `Filtered` view
115||| Constructs the view in O(n lg n)
115||| Constructs the view in O(n lg n)
117filtered : (p : a -> a -> Bool) -> (xs : List a) -> Filtered p xs
117filtered : (p : a -> a -> Bool) -> (xs : List a) -> Filtered p xs
118−filtered p inp with (smallerAcc inp)
118+filtered p inp with (accessible inp)
119 filtered p [] | with_pat = FNil
119 filtered p [] | with_pat = FNil
120 filtered p (x :: xs) | (Access xsrec)
120 filtered p (x :: xs) | (Access xsrec)
121 = FRec (filtered p (filter (\y => p y x) xs) | xsrec _ (filteredLOK p x xs))
121 = FRec (filtered p (filter (\y => p y x) xs) | xsrec _ (filteredLOK p x xs))