Theory Induce
theory Induce
imports Induce_S Induce_L Bucket_Insert
begin
section "Induce"
definition sa_induce_r0 ::
"(('a :: {linorder, order_bot}) ⇒ nat) ⇒
'a list ⇒
nat list ⇒
nat list"
where
"sa_induce_r0 α T LMS =
(let
B0 = map (bucket_end α T) [0..<Suc (α (Max (set T)))];
B1 = map (bucket_start α T) [0..<Suc (α (Max (set T)))];
SA = replicate (length T) (length T);
ST = abs_get_suffix_types T;
SA = abs_bucket_insert α T B0 SA (rev LMS);
SA = induce_l α T ST B1 SA
in induce_s α T ST (B0[0 := 0]) SA)"
definition sa_induce_r1 ::
"(('a :: {linorder, order_bot}) ⇒ nat) ⇒
'a list ⇒
SL_types list ⇒
nat list ⇒
nat list"
where
"sa_induce_r1 α T ST LMS =
(let
B0 = map (bucket_end α T) [0..<Suc (α (Max (set T)))];
B1 = map (bucket_start α T) [0..<Suc (α (Max (set T)))];
SA = replicate (length T) (length T);
SA = abs_bucket_insert α T B0 SA (rev LMS);
SA = induce_l α T ST B1 SA
in induce_s α T ST (B0[0 := 0]) SA)"
definition sa_induce_r2 ::
"(('a :: {linorder, order_bot}) ⇒ nat) ⇒
'a list ⇒
SL_types list ⇒
nat list ⇒
nat list"
where
"sa_induce_r2 α T ST LMS =
(let
B0 = map (bucket_end α T) [0..<Suc (α (Max (set T)))];
B1 = map (bucket_start α T) [0..<Suc (α (Max (set T)))];
SA = replicate (length T) (length T);
SA = bucket_insert α T B0 SA (rev LMS);
SA = induce_l α T ST B1 SA
in induce_s α T ST (B0[0 := 0]) SA)"
abbreviation "sa_induce ≡ sa_induce_r2"
end