lean4-htt/tests/lean/run/symbolFrequency_foldRelevantConsts.lean
Kim Morrison 0db89d65b2
chore: use 'library suggestions' rather than 'premise selection' (#11029)
This PR changes the terminology used from "premise selection" to
"library suggestions". This will be more understandable to users (we
don't assume anyone is familiar with the premise selection literature),
and avoids a conflict with the existing use of "premise" in Lean
terminology (e.g. "major premise" in induction, as well as generally the
synonym for "hypothesis"/"argument").
2025-10-31 04:07:49 +00:00

27 lines
888 B
Text

module
import all Lean.LibrarySuggestions.SymbolFrequency
import all Init.Data.Array.Basic
open Lean LibrarySuggestions
/-- info: [List, Eq, HAppend.hAppend] -/
#guard_msgs in
run_meta do
let ci ← getConstInfo `List.append_assoc
let consts ← ci.type.foldRelevantConstants (init := #[]) (fun n ns => return ns.push n)
logInfo m!"{consts}"
/-- info: [List, Ne, HAppend.hAppend, List.nil, Eq, List.head] -/
#guard_msgs in
run_meta do
let ci ← getConstInfo `List.head_append_right
let consts ← ci.type.foldRelevantConstants (init := #[]) (fun n ns => return ns.push n)
logInfo m!"{consts}"
/-- info: [Array, Nat, LT.lt, Array.size, HAdd.hAdd, OfNat.ofNat, Array.swap, Not] -/
#guard_msgs in
run_meta do
let ci ← getConstInfo `Array.eraseIdx.induct
let consts ← ci.type.foldRelevantConstants (init := #[]) (fun n ns => return ns.push n)
logInfo m!"{consts}"