OEIS A166944 - factor predicates as abbreviations, for decision procedures
Definitiona166944_factors_abbrevconjecturenumber-theoryoeisprime-gapsrecurrence
The two factor predicates of the A166944 terminal argument, declared with abbrev rather than def:
- : no integer with divides ;
- : no with divides .
The distinction from the def form in a166944_factor_layer is not cosmetic. An abbrev is transparent during elaboration, so Lean can synthesise the Decidable instance for a bounded universal quantifier over Fin N, and decide can evaluate concrete instances. A def blocks that synthesis. The replay checker decides propositions of exactly this shape -- finitely many indices, each with a divisibility test -- so it needs the abbreviation form.
Both predicates carry a D suffix so they can coexist with the def versions in the same namespace and environment; they are definitionally the same statements for any use that does not go through decide.
Definition code
/-! # Factor predicates, as abbreviations The same two predicates as `a166944_factor_layer`, declared with `abbrev` rather than `def`. The difference matters for `decide`: an `abbrev` is transparent during elaboration, so `Decidable` instances for finite `∀` over `Fin` synthesise, while a `def` blocks them. The replay checker in the terminal argument decides propositions of exactly that shape, so the abbreviation form is the one it needs. `NoSmallFactor N root` says no `f` in `[2, root]` divides `N`. `NoProperFactor N` says no `f` in `[2, N)` does. -/ namespace A166944Research /-- No divisor of `N` lies in `[2, root]`. -/ abbrev NoSmallFactorD (N root : Nat) : Prop := ∀ f : Fin (root + 1), 2 ≤ f.val → ¬ f.val ∣ N /-- No divisor of `N` lies in `[2, N)`. -/ abbrev NoProperFactorD (N : Nat) : Prop := ∀ f : Fin N, 2 ≤ f.val → ¬ f.val ∣ N end A166944Research
Source
Derived within this development; same predicates as a166944_factor_layer, in abbreviation form. See https://github.com/tara-sooo/A166944-Lean