fact: Definition find_fixpoints (ctx : program) : list term := let (Σ, t) := ctx in let goal := drop_quantification t in let fixpoint_candidates := match goal with | tApp hd args => (goal :: (split_apps (map drop_quantification args))) | _ => [tVar "error: the goal does not have an application"] end in let fixpoints := filter (fun t=> match t with | tApp (tConst kn _) _ => (match lookup_constant Σ kn with | Some b => true | _ => false end) | _ => false end) fixpoint_candidates in fixpoints.
imports: MetaCoq.Template(All) MetaCoq.Utils(bytestring) List