fact: Definition find_sym_k th1 th2 (si sj : seq nat) := let store_lit c kv ksig := let: (k, v) := kv in if v == 0 then ksig else let cv := (c, v) in let fix insert_in (cvs : seq (nat * int)) := if cvs is cv' :: cvs' then if (c < cv'.1)%N then cv :: cvs else cv' :: insert_in cvs' else [:: cv] in set_nth nil ksig k (insert_in (nth nil ksig k)) in let fix read_lit ksig1 ksig2 := if ksig1 is cvs :: ksig1' then let k := index cvs ksig2 in k :: read_lit ksig1' (set_nth nil ksig2 k nil) else nil in let fix store2 ksig1 ksig2 cls1 := if cls1 is (i1, j1, kvs1) :: cls1' then if get_cl (nth 0 si i1, nth 0 sj j1)%N th2 is Some (_, kvs2) then let st_kvs := foldr (store_lit (i1.*2 + j1)%N) in store2 (st_kvs ksig1 kvs1) (st_kvs ksig2 kvs2) cls1' else None else let sk := read_lit ksig1 ksig2 in if all (gtn (size ksig2)) sk then Some (Sym si sj sk) else None in store2 nil nil th1.
imports: mathcomp.ssreflect.ssreflect mathcomp(ssrbool ssrfun eqtype ssrnat seq path div choice fintype) mathcomp(tuple finfun bigop order prime ssralg matrix poly finset) mathcomp(fingroup morphism perm automorphism quotient action finalg zmodp) mathcomp(gfunctor center gproduct cyclic pgroup abelian frobenius) mathcomp(mxalgebra mxrepresentation vector falgebra fieldext galois) mathcomp(ssrnum rat algC algnum classfun character) mathcomp(integral_char inertia vcharacter) odd_order(PFsection1 PFsection2)